Skip to content

Commit 634a857

Browse files
authored
use numpy dtype exposed by zarr array instead of metadata.data_type (#10348)
1 parent f3b83ed commit 634a857

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

xarray/backends/zarr.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,9 +877,8 @@ def open_store_variable(self, name):
877877
if zarr_array.fill_value is not None:
878878
attributes["_FillValue"] = zarr_array.fill_value
879879
elif "_FillValue" in attributes:
880-
original_zarr_dtype = zarr_array.metadata.data_type
881880
attributes["_FillValue"] = FillValueCoder.decode(
882-
attributes["_FillValue"], original_zarr_dtype.value
881+
attributes["_FillValue"], zarr_array.dtype
883882
)
884883

885884
return Variable(dimensions, data, attributes, encoding)

0 commit comments

Comments
 (0)