Skip to content

Commit

Permalink
use alias dataset.sizes because of the xarray FutureWarning:
Browse files Browse the repository at this point in the history
The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`
  • Loading branch information
danielfromearth committed Nov 19, 2024
1 parent a1b7884 commit 621ed49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion concatenator/dataset_and_group_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def regroup_flattened_dataset(
for dim_name, _ in dataset.dims.items():
new_dim_name = str(dim_name).rsplit(concatenator.group_delim, 1)[-1]
dim_group = _get_nested_group(base_dataset, str(dim_name))
dim_group.createDimension(new_dim_name, dataset.dims[dim_name])
dim_group.createDimension(new_dim_name, dataset.sizes[dim_name])
# dst.createDimension(
# name, (len(dimension) if not dimension.isunlimited() else None))

Expand Down

0 comments on commit 621ed49

Please sign in to comment.