Skip to content

Commit 56c6396

Browse files
committed
Fewer changes
1 parent 6ad752f commit 56c6396

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xarray/backends/h5netcdf_.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ def open_store_variable(self, name, var):
264264
import h5py
265265

266266
dimensions = var.dimensions
267-
attributes = _read_attributes(var)
268267
data = indexing.LazilyIndexedArray(H5NetCDFArrayWrapper(name, self))
268+
attrs = _read_attributes(var)
269269
encoding: dict[str, Any] = {}
270270
if (datatype := var.datatype) and isinstance(datatype, h5netcdf.core.EnumType):
271271
encoding["dtype"] = np.dtype(
@@ -319,7 +319,7 @@ def open_store_variable(self, name, var):
319319
encoding["source"] = self._filename
320320
encoding["original_shape"] = data.shape
321321

322-
return Variable(dimensions, data, attributes, encoding)
322+
return Variable(dimensions, data, attrs, encoding)
323323

324324
def get_variables(self):
325325
return FrozenDict(

0 commit comments

Comments
 (0)