Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xarray/backends/h5netcdf_.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ def ds(self):
return self._acquire()

def open_store_variable(self, name, var):
import h5netcdf
import h5py
from h5netcdf.core import EnumType

dimensions = var.dimensions
data = indexing.LazilyIndexedArray(H5NetCDFArrayWrapper(name, self))
Expand Down Expand Up @@ -276,7 +276,7 @@ def open_store_variable(self, name, var):
# just check if datatype is available and create dtype
# this check can be removed if h5netcdf >= 1.4.0 for any environment
elif (datatype := getattr(var, "datatype", None)) and isinstance(
datatype, h5netcdf.core.EnumType
datatype, EnumType
):
encoding["dtype"] = np.dtype(
data.dtype,
Expand Down
Loading