@@ -374,21 +374,28 @@ def _test_persistence(self, a, chunks):
374
374
shutil .rmtree (path )
375
375
376
376
def test_persistence_1d (self ):
377
+
377
378
# simple dtype
378
- self ._test_persistence (np .arange (1050 ), chunks = (100 ,))
379
+ for dtype in '<i4' , '>i4' :
380
+ a = np .arange (1050 , dtype = dtype )
381
+ self ._test_persistence (a , chunks = (100 ,))
382
+
379
383
# structured dtype
380
384
dtype = np .dtype ([('a' , 'i4' ), ('b' , 'S10' )])
381
- self ._test_persistence (np .empty (10000 , dtype = dtype ), chunks = (100 ,))
385
+ a = np .empty (10000 , dtype = dtype )
386
+ self ._test_persistence (a , chunks = (100 ,))
382
387
383
388
def test_persistence_2d (self ):
384
- chunks = ( 100 , 2 )
389
+
385
390
# simple dtype
386
- a = np .arange (10000 ).reshape ((1000 , 10 ))
387
- self ._test_persistence (a , chunks = chunks )
391
+ for dtype in '<i4' , '>i4' :
392
+ a = np .arange (10000 , dtype = dtype ).reshape ((1000 , 10 ))
393
+ self ._test_persistence (a , chunks = (100 , 2 ))
394
+
388
395
# structured dtype
389
396
dtype = np .dtype ([('a' , 'i4' ), ('b' , 'S10' )])
390
- self . _test_persistence ( np .empty ((1000 , 10 ), dtype = dtype ),
391
- chunks = chunks )
397
+ a = np .empty ((1000 , 10 ), dtype = dtype )
398
+ self . _test_persistence ( a , chunks = ( 100 , 2 ) )
392
399
393
400
def test_resize_persistence (self ):
394
401
0 commit comments