Skip to content

Commit 2b2e3da

Browse files
committed
Fixed fill_value
1 parent 1d17140 commit 2b2e3da

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/v3/test_group.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,11 @@ def test_group_child_iterators(store: Store, zarr_format: ZarrFormat, consolidat
414414
group.create_array(name=name, shape=(1,)) for name in expected_array_keys
415415
]
416416
expected_arrays = list(zip(expected_array_keys, expected_array_values, strict=False))
417+
fill_value: float | None
418+
if zarr_format == 2:
419+
fill_value = None
420+
else:
421+
fill_value = np.float64(0.0)
417422

418423
if consolidate:
419424
group = zarr.consolidate_metadata(store)
@@ -422,7 +427,7 @@ def test_group_child_iterators(store: Store, zarr_format: ZarrFormat, consolidat
422427
"subarray": {
423428
"attributes": {},
424429
"dtype": "float64",
425-
"fill_value": np.float64(0.0),
430+
"fill_value": fill_value,
426431
"shape": (1,),
427432
"chunks": (1,),
428433
"order": "C",
@@ -453,7 +458,7 @@ def test_group_child_iterators(store: Store, zarr_format: ZarrFormat, consolidat
453458
},
454459
"codecs": ({"configuration": {"endian": "little"}, "name": "bytes"},),
455460
"data_type": "float64",
456-
"fill_value": np.float64(0.0),
461+
"fill_value": fill_value,
457462
"node_type": "array",
458463
"shape": (1,),
459464
"zarr_format": zarr_format,

0 commit comments

Comments
 (0)