jbusecke / dynamic_chunks

Determine appropriate chunk sizes for a given xarray dataset based on target chunk size and 'chunk aspect ratio'
Apache License 2.0
11 stars 0 forks source link

Prevent deprecation warning for ds.dims #8

Closed jbusecke closed 7 months ago

jbusecke commented 7 months ago

Get rid of the

FutureWarning: 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`.
  shape_chunked_only = np.array([ds.dims[dim] for dim in dims_chunked_only])