@@ -47,7 +47,7 @@ def test_array_init(self):
47
47
48
48
# normal initialization
49
49
store = dict ()
50
- init_array (store , shape = 100 , chunks = 10 )
50
+ init_array (store , shape = 100 , chunks = 10 , dtype = '<f8' )
51
51
a = Array (store )
52
52
assert isinstance (a , Array )
53
53
assert (100 ,) == a .shape
@@ -60,7 +60,7 @@ def test_array_init(self):
60
60
61
61
# initialize at path
62
62
store = dict ()
63
- init_array (store , shape = 100 , chunks = 10 , path = 'foo/bar' )
63
+ init_array (store , shape = 100 , chunks = 10 , path = 'foo/bar' , dtype = '<f8' )
64
64
a = Array (store , path = 'foo/bar' )
65
65
assert isinstance (a , Array )
66
66
assert (100 ,) == a .shape
@@ -503,24 +503,24 @@ def test_setitem_data_not_shared(self):
503
503
504
504
def test_hexdigest (self ):
505
505
# Check basic 1-D array
506
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
506
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
507
507
assert '063b02ff8d9d3bab6da932ad5828b506ef0a6578' == z .hexdigest ()
508
508
509
509
# Check basic 1-D array with different type
510
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'f4' )
510
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< f4' )
511
511
assert 'f97b84dc9ffac807415f750100108764e837bb82' == z .hexdigest ()
512
512
513
513
# Check basic 2-D array
514
- z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = 'i4' )
514
+ z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = '< i4' )
515
515
assert '4f797d7bdad0fa1c9fa8c80832efb891a68de104' == z .hexdigest ()
516
516
517
517
# Check basic 1-D array with some data
518
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
518
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
519
519
z [200 :400 ] = np .arange (200 , 400 , dtype = 'i4' )
520
520
assert '14470724dca6c1837edddedc490571b6a7f270bc' == z .hexdigest ()
521
521
522
522
# Check basic 1-D array with attributes
523
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
523
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
524
524
z .attrs ['foo' ] = 'bar'
525
525
assert '2a1046dd99b914459b3e86be9dde05027a07d209' == z .hexdigest ()
526
526
@@ -1293,24 +1293,24 @@ def create_array(read_only=False, **kwargs):
1293
1293
1294
1294
def test_hexdigest (self ):
1295
1295
# Check basic 1-D array
1296
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1296
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1297
1297
assert 'f710da18d45d38d4aaf2afd7fb822fdd73d02957' == z .hexdigest ()
1298
1298
1299
1299
# Check basic 1-D array with different type
1300
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'f4' )
1300
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< f4' )
1301
1301
assert '1437428e69754b1e1a38bd7fc9e43669577620db' == z .hexdigest ()
1302
1302
1303
1303
# Check basic 2-D array
1304
- z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = 'i4' )
1304
+ z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = '< i4' )
1305
1305
assert 'dde44c72cc530bd6aae39b629eb15a2da627e5f9' == z .hexdigest ()
1306
1306
1307
1307
# Check basic 1-D array with some data
1308
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1308
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1309
1309
z [200 :400 ] = np .arange (200 , 400 , dtype = 'i4' )
1310
1310
assert '4c0a76fb1222498e09dcd92f7f9221d6cea8b40e' == z .hexdigest ()
1311
1311
1312
1312
# Check basic 1-D array with attributes
1313
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1313
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1314
1314
z .attrs ['foo' ] = 'bar'
1315
1315
assert '05b0663ffe1785f38d3a459dec17e57a18f254af' == z .hexdigest ()
1316
1316
@@ -1348,24 +1348,24 @@ def create_array(read_only=False, **kwargs):
1348
1348
1349
1349
def test_hexdigest (self ):
1350
1350
# Check basic 1-D array
1351
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1351
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1352
1352
assert 'f710da18d45d38d4aaf2afd7fb822fdd73d02957' == z .hexdigest ()
1353
1353
1354
1354
# Check basic 1-D array with different type
1355
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'f4' )
1355
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< f4' )
1356
1356
assert '1437428e69754b1e1a38bd7fc9e43669577620db' == z .hexdigest ()
1357
1357
1358
1358
# Check basic 2-D array
1359
- z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = 'i4' )
1359
+ z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = '< i4' )
1360
1360
assert 'dde44c72cc530bd6aae39b629eb15a2da627e5f9' == z .hexdigest ()
1361
1361
1362
1362
# Check basic 1-D array with some data
1363
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1363
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1364
1364
z [200 :400 ] = np .arange (200 , 400 , dtype = 'i4' )
1365
1365
assert '4c0a76fb1222498e09dcd92f7f9221d6cea8b40e' == z .hexdigest ()
1366
1366
1367
1367
# Check basic 1-D array with attributes
1368
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1368
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1369
1369
z .attrs ['foo' ] = 'bar'
1370
1370
assert '05b0663ffe1785f38d3a459dec17e57a18f254af' == z .hexdigest ()
1371
1371
@@ -1704,24 +1704,24 @@ def test_compressors(self):
1704
1704
1705
1705
def test_hexdigest (self ):
1706
1706
# Check basic 1-D array
1707
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1707
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1708
1708
assert 'c6b83adfad999fbd865057531d749d87cf138f58' == z .hexdigest ()
1709
1709
1710
1710
# Check basic 1-D array with different type
1711
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'f4' )
1711
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< f4' )
1712
1712
assert 'a3d6d187536ecc3a9dd6897df55d258e2f52f9c5' == z .hexdigest ()
1713
1713
1714
1714
# Check basic 2-D array
1715
- z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = 'i4' )
1715
+ z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = '< i4' )
1716
1716
assert '189690c5701d33a41cd7ce9aa0ac8dac49a69c51' == z .hexdigest ()
1717
1717
1718
1718
# Check basic 1-D array with some data
1719
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1719
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1720
1720
z [200 :400 ] = np .arange (200 , 400 , dtype = 'i4' )
1721
1721
assert 'b63f031031dcd5248785616edcb2d6fe68203c28' == z .hexdigest ()
1722
1722
1723
1723
# Check basic 1-D array with attributes
1724
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1724
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1725
1725
z .attrs ['foo' ] = 'bar'
1726
1726
assert '0cfc673215a8292a87f3c505e2402ce75243c601' == z .hexdigest ()
1727
1727
@@ -1854,24 +1854,24 @@ def create_array(self, read_only=False, **kwargs):
1854
1854
1855
1855
def test_hexdigest (self ):
1856
1856
# Check basic 1-D array
1857
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1857
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1858
1858
assert 'd3da3d485de4a5fcc6d91f9dfc6a7cba9720c561' == z .hexdigest ()
1859
1859
1860
1860
# Check basic 1-D array with different type
1861
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'f4' )
1861
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< f4' )
1862
1862
assert '443b8dee512e42946cb63ff01d28e9bee8105a5f' == z .hexdigest ()
1863
1863
1864
1864
# Check basic 2-D array
1865
- z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = 'i4' )
1865
+ z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = '< i4' )
1866
1866
assert 'de841ca276042993da53985de1e7769f5d0fc54d' == z .hexdigest ()
1867
1867
1868
1868
# Check basic 1-D array with some data
1869
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1869
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1870
1870
z [200 :400 ] = np .arange (200 , 400 , dtype = 'i4' )
1871
1871
assert '42b6ae0d50ec361628736ab7e68fe5fefca22136' == z .hexdigest ()
1872
1872
1873
1873
# Check basic 1-D array with attributes
1874
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1874
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1875
1875
z .attrs ['foo' ] = 'bar'
1876
1876
assert 'a0535f31c130f5e5ac66ba0713d1c1ceaebd089b' == z .hexdigest ()
1877
1877
@@ -1890,24 +1890,24 @@ def create_array(self, read_only=False, **kwargs):
1890
1890
1891
1891
def test_hexdigest (self ):
1892
1892
# Check basic 1-D array
1893
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1893
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1894
1894
assert '33141032439fb1df5e24ad9891a7d845b6c668c8' == z .hexdigest ()
1895
1895
1896
1896
# Check basic 1-D array with different type
1897
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'f4' )
1897
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< f4' )
1898
1898
assert '44d719da065c88a412d609a5500ff41e07b331d6' == z .hexdigest ()
1899
1899
1900
1900
# Check basic 2-D array
1901
- z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = 'i4' )
1901
+ z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = '< i4' )
1902
1902
assert 'f57a9a73a4004490fe1b871688651b8a298a5db7' == z .hexdigest ()
1903
1903
1904
1904
# Check basic 1-D array with some data
1905
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1905
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1906
1906
z [200 :400 ] = np .arange (200 , 400 , dtype = 'i4' )
1907
1907
assert '1e1bcaac63e4ef3c4a68f11672537131c627f168' == z .hexdigest ()
1908
1908
1909
1909
# Check basic 1-D array with attributes
1910
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1910
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1911
1911
z .attrs ['foo' ] = 'bar'
1912
1912
assert '86d7b9bf22dccbeaa22f340f38be506b55e76ff2' == z .hexdigest ()
1913
1913
@@ -1926,24 +1926,24 @@ def create_array(self, read_only=False, **kwargs):
1926
1926
1927
1927
def test_hexdigest (self ):
1928
1928
# Check basic 1-D array
1929
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1929
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1930
1930
assert '7ff2ae8511eac915fad311647c168ccfe943e788' == z .hexdigest ()
1931
1931
1932
1932
# Check basic 1-D array with different type
1933
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'f4' )
1933
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< f4' )
1934
1934
assert '962705c861863495e9ccb7be7735907aa15e85b5' == z .hexdigest ()
1935
1935
1936
1936
# Check basic 2-D array
1937
- z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = 'i4' )
1937
+ z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = '< i4' )
1938
1938
assert 'deb675ff91dd26dba11b65aab5f19a1f21a5645b' == z .hexdigest ()
1939
1939
1940
1940
# Check basic 1-D array with some data
1941
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1941
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1942
1942
z [200 :400 ] = np .arange (200 , 400 , dtype = 'i4' )
1943
1943
assert '90e30bdab745a9641cd0eb605356f531bc8ec1c3' == z .hexdigest ()
1944
1944
1945
1945
# Check basic 1-D array with attributes
1946
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1946
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1947
1947
z .attrs ['foo' ] = 'bar'
1948
1948
assert '95d40c391f167db8b1290e3c39d9bf741edacdf6' == z .hexdigest ()
1949
1949
@@ -1969,24 +1969,24 @@ def create_array(self, read_only=False, **kwargs):
1969
1969
1970
1970
def test_hexdigest (self ):
1971
1971
# Check basic 1-D array
1972
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1972
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1973
1973
assert '93ecaa530a1162a9d48a3c1dcee4586ccfc59bae' == z .hexdigest ()
1974
1974
1975
1975
# Check basic 1-D array with different type
1976
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'f4' )
1976
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< f4' )
1977
1977
assert '04a9755a0cd638683531b7816c7fa4fbb6f577f2' == z .hexdigest ()
1978
1978
1979
1979
# Check basic 2-D array
1980
- z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = 'i4' )
1980
+ z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = '< i4' )
1981
1981
assert 'b93b163a21e8500519250a6defb821d03eb5d9e0' == z .hexdigest ()
1982
1982
1983
1983
# Check basic 1-D array with some data
1984
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1984
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1985
1985
z [200 :400 ] = np .arange (200 , 400 , dtype = 'i4' )
1986
1986
assert 'cde499f3dc945b4e97197ff8e3cf8188a1262c35' == z .hexdigest ()
1987
1987
1988
1988
# Check basic 1-D array with attributes
1989
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
1989
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
1990
1990
z .attrs ['foo' ] = 'bar'
1991
1991
assert 'e2cf3afbf66ad0e28a2b6b68b1b07817c69aaee2' == z .hexdigest ()
1992
1992
@@ -2012,24 +2012,24 @@ def create_array(read_only=False, **kwargs):
2012
2012
2013
2013
def test_hexdigest (self ):
2014
2014
# Check basic 1-D array
2015
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
2015
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
2016
2016
assert 'b80367c5599d47110d42bd8886240c2f46620dba' == z .hexdigest ()
2017
2017
2018
2018
# Check basic 1-D array with different type
2019
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'f4' )
2019
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< f4' )
2020
2020
assert '95a7b2471225e73199c9716d21e8d3dd6e5f6f2a' == z .hexdigest ()
2021
2021
2022
2022
# Check basic 2-D array
2023
- z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = 'i4' )
2023
+ z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = '< i4' )
2024
2024
assert '9abf3ad54413ab11855d88a5e0087cd416657e02' == z .hexdigest ()
2025
2025
2026
2026
# Check basic 1-D array with some data
2027
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
2027
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
2028
2028
z [200 :400 ] = np .arange (200 , 400 , dtype = 'i4' )
2029
2029
assert 'c649ad229bc5720258b934ea958570c2f354c2eb' == z .hexdigest ()
2030
2030
2031
2031
# Check basic 1-D array with attributes
2032
- z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = 'i4' )
2032
+ z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '< i4' )
2033
2033
z .attrs ['foo' ] = 'bar'
2034
2034
assert '62fc9236d78af18a5ec26c12eea1d33bce52501e' == z .hexdigest ()
2035
2035
0 commit comments