File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -411,3 +411,20 @@ def test_dtypes(dtype_str: str) -> None:
411411 else :
412412 # return type for vlen types may vary depending on numpy version
413413 assert dt .byte_count is None
414+
415+
416+ def test_metadata_comparison_with_nan_fill_value ():
417+ # regression test for https://github.com/zarr-developers/zarr-python/issues/2929
418+ metadata_dict = {
419+ "zarr_format" : 3 ,
420+ "node_type" : "array" ,
421+ "shape" : (1 ,),
422+ "chunk_grid" : {"name" : "regular" , "configuration" : {"chunk_shape" : (1 ,)}},
423+ "data_type" : np .dtype ("float32" ),
424+ "chunk_key_encoding" : {"name" : "default" , "separator" : "." },
425+ "codecs" : ({'name' : 'bytes' , 'configuration' : {'endian' : 'little' }},),
426+ "fill_value" : np .float32 ("nan" ),
427+ }
428+ metadata1 = ArrayV3Metadata .from_dict (metadata_dict )
429+ metadata2 = ArrayV3Metadata .from_dict (metadata_dict )
430+ assert metadata1 == metadata2
You can’t perform that action at this time.
0 commit comments