File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1356,7 +1356,8 @@ def to_xarray(self) -> xr.DataArray:
13561356 coords [dim ] = (dim , values , attrs )
13571357
13581358 # Restore any previously saved DataArray attrs from zarr
1359- saved_attrs = dict (self .zattrs .get ("iohub_xarray_attrs" , {}))
1359+ iohub_dict = self .zattrs .get ("iohub" , {})
1360+ saved_attrs = dict (iohub_dict .get ("xarray_attrs" , {}))
13601361
13611362 return xr .DataArray (
13621363 data ,
@@ -1467,7 +1468,9 @@ def _coord_unit(dim, default):
14671468
14681469 # Persist DataArray attrs to zarr for round-tripping
14691470 if data_array .attrs :
1470- self .zattrs ["iohub_xarray_attrs" ] = dict (data_array .attrs )
1471+ iohub_dict = dict (self .zattrs .get ("iohub" , {}))
1472+ iohub_dict ["xarray_attrs" ] = dict (data_array .attrs )
1473+ self .zattrs ["iohub" ] = iohub_dict
14711474
14721475
14731476class TiledPosition (Position ):
You can’t perform that action at this time.
0 commit comments