File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ def parse_fill_value(
391391 pass
392392 elif fill_value in ["Infinity" , "-Infinity" ] and not np .isfinite (casted_value ):
393393 pass
394- elif dtype .kind == "f " :
394+ elif dtype .kind in "cf " :
395395 # float comparison is not exact, especially when dtype <float64
396396 # so we us np.isclose for this comparison.
397397 # this also allows us to compare nan fill_values
Original file line number Diff line number Diff line change 1818 max_leaves = 3 ,
1919)
2020
21+
22+ def dtypes () -> st .SearchStrategy [np .dtype ]:
23+ return (
24+ npst .integer_dtypes (endianness = "=" )
25+ | npst .unsigned_integer_dtypes (endianness = "=" )
26+ | npst .floating_dtypes (endianness = "=" )
27+ | npst .complex_number_dtypes (endianness = "=" )
28+ # | npst.unicode_string_dtypes()
29+ # | npst.datetime64_dtypes()
30+ # | npst.timedelta64_dtypes()
31+ )
32+
33+
2134# From https://zarr-specs.readthedocs.io/en/latest/v3/core/v3.0.html#node-names
2235# 1. must not be the empty string ("")
2336# 2. must not include the character "/"
3346attrs = st .none () | st .dictionaries (_attr_keys , _attr_values )
3447paths = st .lists (node_names , min_size = 1 ).map (lambda x : "/" .join (x )) | st .just ("/" )
3548np_arrays = npst .arrays (
36- # TODO: re-enable timedeltas once they are supported
37- dtype = npst .scalar_dtypes ().filter (
38- lambda x : (x .kind not in ["m" , "M" ]) and (x .byteorder not in [">" ])
39- ),
49+ dtype = dtypes (),
4050 shape = npst .array_shapes (max_dims = 4 ),
4151)
4252stores = st .builds (MemoryStore , st .just ({}), mode = st .just ("w" ))
You can’t perform that action at this time.
0 commit comments