@@ -2227,38 +2227,38 @@ def test_format_compatibility():
2227
2227
np .random .seed (42 )
2228
2228
2229
2229
arrays_chunks = [
2230
- (np .arange (1111 , dtype = "<i1" ), 100 ),
2231
- (np .arange (1111 , dtype = "<i2" ), 100 ),
2232
- (np .arange (1111 , dtype = "<i4" ), 100 ),
2233
- (np .arange (1111 , dtype = "<i8" ), 1000 ),
2230
+ (np .arange (1111 , dtype = "<i1" ), 600 ),
2231
+ (np .arange (1111 , dtype = "<i2" ), 600 ),
2232
+ (np .arange (1111 , dtype = "<i4" ), 600 ),
2233
+ (np .arange (1111 , dtype = "<i8" ), 600 ),
2234
2234
(np .random .randint (0 , 200 , size = 2222 , dtype = "u1" ).astype ("<u1" ), 100 ),
2235
- (np .random .randint (0 , 2000 , size = 2222 , dtype = "u2" ).astype ("<u2" ), 100 ),
2236
- (np .random .randint (0 , 2000 , size = 2222 , dtype = "u4" ).astype ("<u4" ), 100 ),
2237
- (np .random .randint (0 , 2000 , size = 2222 , dtype = "u8" ).astype ("<u8" ), 100 ),
2238
- (np .linspace (0 , 1 , 3333 , dtype = "<f2" ), 100 ),
2239
- (np .linspace (0 , 1 , 3333 , dtype = "<f4" ), 100 ),
2240
- (np .linspace (0 , 1 , 3333 , dtype = "<f8" ), 100 ),
2241
- (np .random .normal (loc = 0 , scale = 1 , size = 4444 ).astype ("<f2" ), 100 ),
2242
- (np .random .normal (loc = 0 , scale = 1 , size = 4444 ).astype ("<f4" ), 100 ),
2243
- (np .random .normal (loc = 0 , scale = 1 , size = 4444 ).astype ("<f8" ), 100 ),
2244
- (np .random .choice ([b"A" , b"C" , b"G" , b"T" ], size = 5555 , replace = True ).astype ("S" ), 100 ),
2235
+ (np .random .randint (0 , 2000 , size = 2222 , dtype = "u2" ).astype ("<u2" ), 1000 ),
2236
+ (np .random .randint (0 , 2000 , size = 2222 , dtype = "u4" ).astype ("<u4" ), 1000 ),
2237
+ (np .random .randint (0 , 2000 , size = 2222 , dtype = "u8" ).astype ("<u8" ), 1000 ),
2238
+ (np .linspace (0 , 1 , 3333 , dtype = "<f2" ), 600 ),
2239
+ (np .linspace (0 , 1 , 3333 , dtype = "<f4" ), 600 ),
2240
+ (np .linspace (0 , 1 , 3333 , dtype = "<f8" ), 600 ),
2241
+ (np .random .normal (loc = 0 , scale = 1 , size = 4444 ).astype ("<f2" ), 3000 ),
2242
+ (np .random .normal (loc = 0 , scale = 1 , size = 4444 ).astype ("<f4" ), 3000 ),
2243
+ (np .random .normal (loc = 0 , scale = 1 , size = 4444 ).astype ("<f8" ), 3000 ),
2244
+ (np .random .choice ([b"A" , b"C" , b"G" , b"T" ], size = 5555 , replace = True ).astype ("S" ), 3000 ),
2245
2245
(
2246
2246
np .random .choice (["foo" , "bar" , "baz" , "quux" ], size = 5555 , replace = True ).astype ("<U" ),
2247
- 100 ,
2247
+ 3000 ,
2248
2248
),
2249
2249
(
2250
2250
np .random .choice ([0 , 1 / 3 , 1 / 7 , 1 / 9 , np .nan ], size = 5555 , replace = True ).astype (
2251
2251
"<f8"
2252
2252
),
2253
- 100 ,
2253
+ 3000 ,
2254
2254
),
2255
- (np .random .randint (0 , 2 , size = 5555 , dtype = bool ), 100 ),
2256
- (np .arange (20000 , dtype = "<i4" ).reshape (2000 , 10 , order = "C" ), (100 , 3 )),
2257
- (np .arange (20000 , dtype = "<i4" ).reshape (200 , 100 , order = "F" ), (100 , 30 )),
2258
- (np .arange (20000 , dtype = "<i4" ).reshape (200 , 10 , 10 , order = "C" ), (100 , 3 , 3 )),
2259
- (np .arange (20000 , dtype = "<i4" ).reshape (20 , 100 , 10 , order = "F" ), (10 , 30 , 3 )),
2260
- (np .arange (20000 , dtype = "<i4" ).reshape (20 , 10 , 10 , 10 , order = "C" ), (10 , 3 , 3 , 3 )),
2261
- (np .arange (20000 , dtype = "<i4" ).reshape (20 , 10 , 10 , 10 , order = "F" ), (10 , 3 , 3 , 3 )),
2255
+ (np .random .randint (0 , 2 , size = 5555 , dtype = bool ), 3000 ),
2256
+ (np .arange (20000 , dtype = "<i4" ).reshape (2000 , 10 , order = "C" ), (2000 , 5 )),
2257
+ (np .arange (20000 , dtype = "<i4" ).reshape (200 , 100 , order = "F" ), (200 , 50 )),
2258
+ (np .arange (20000 , dtype = "<i4" ).reshape (200 , 10 , 10 , order = "C" ), (200 , 10 , 5 )),
2259
+ (np .arange (20000 , dtype = "<i4" ).reshape (20 , 100 , 10 , order = "F" ), (20 , 100 , 5 )),
2260
+ (np .arange (20000 , dtype = "<i4" ).reshape (20 , 10 , 10 , 10 , order = "C" ), (20 , 10 , 10 , 5 )),
2261
+ (np .arange (20000 , dtype = "<i4" ).reshape (20 , 10 , 10 , 10 , order = "F" ), (20 , 10 , 10 , 5 )),
2262
2262
]
2263
2263
2264
2264
compressors = [
@@ -2280,9 +2280,9 @@ def test_format_compatibility():
2280
2280
for j , compressor in enumerate (compressors ):
2281
2281
path = "{}/{}" .format (i , j )
2282
2282
2283
- if path not in fixture : # pragma: no cover
2283
+ # if path not in fixture: # pragma: no cover
2284
2284
# store the data - should be one-time operation
2285
- fixture .array (path , data = arr , chunks = chunks , order = order , compressor = compressor )
2285
+ # fixture.array(path, data=arr, chunks=chunks, order=order, compressor=compressor)
2286
2286
2287
2287
# setup array
2288
2288
z = fixture [path ]
@@ -2457,13 +2457,12 @@ def test_normalize_store_arg(tmpdir):
2457
2457
assert isinstance (store , FSStore )
2458
2458
2459
2459
2460
- def test_meta_prefix_6853 ():
2461
- fixture = pathlib .Path (zarr . v2 . __file__ ). resolve (). parent . parent / "fixture"
2460
+ def test_meta_prefix_6853 (tmpdir ):
2461
+ fixture = pathlib .Path (str ( tmpdir )) / "fixture"
2462
2462
meta = fixture / "meta"
2463
- if not meta .exists (): # pragma: no cover
2464
- s = DirectoryStore (str (meta ), dimension_separator = "." )
2465
- a = zarr .v2 .open (store = s , mode = "w" , shape = (2 , 2 ), dtype = "<i8" )
2466
- a [:] = [[1 , 2 ], [3 , 4 ]]
2463
+ s = DirectoryStore (str (meta ), dimension_separator = "." )
2464
+ a = zarr .v2 .open (store = s , mode = "w" , shape = (2 , 2 ), dtype = "<i8" )
2465
+ a [:] = [[1 , 2 ], [3 , 4 ]]
2467
2466
2468
2467
fixtures = group (store = DirectoryStore (str (fixture )))
2469
2468
assert list (fixtures .arrays ())
0 commit comments