File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -816,25 +816,9 @@ def open_store_variable(self, name):
816
816
if zarr_array .fill_value is not None :
817
817
attributes ["_FillValue" ] = zarr_array .fill_value
818
818
elif "_FillValue" in attributes :
819
- # TODO update version check for the released version with dtypes
820
- # probably be 3.1
821
-
822
- # if Version(zarr.__version__) > Version("3.0.10"):
823
- if hasattr (zarr_array .metadata .data_type , "to_native_dtype" ):
824
- native_dtype = zarr_array .metadata .data_type .to_native_dtype ()
825
- attributes ["_FillValue" ] = (
826
- # Use the new dtype infrastructure instead of doing xarray
827
- # specific fill value decoding
828
- FillValueCoder .decode (
829
- attributes ["_FillValue" ],
830
- native_dtype ,
831
- )
832
- )
833
- else :
834
- dtype_value = zarr_array .metadata .data_type .value
835
- attributes ["_FillValue" ] = FillValueCoder .decode (
836
- attributes ["_FillValue" ], dtype_value
837
- )
819
+ attributes ["_FillValue" ] = FillValueCoder .decode (
820
+ attributes ["_FillValue" ], zarr_array .dtype
821
+ )
838
822
839
823
variable = Variable (dimensions , data , attributes , encoding )
840
824
You can’t perform that action at this time.
0 commit comments