Skip to content

Commit

Permalink
Fix xarray's FutureWarning about Dataset.dims (capytaine#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
mancellin authored Jan 3, 2024
1 parent a0e5730 commit f5f0b9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion capytaine/io/xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def problems_from_dataset(dataset: xr.Dataset,
"All bodies should have different names."

# Warn user in case of key with unrecognized name (e.g. misspells)
keys_in_dataset = set(dataset.dims.keys())
keys_in_dataset = set(dataset.dims)
accepted_keys = {'wave_direction', 'radiating_dof', 'influenced_dof',
'body_name', 'omega', 'period', 'wavelength', 'wavenumber',
'water_depth', 'rho', 'g'}
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ Internals

* The `delete_first_lru_cache` decorator has been renamed :func:`~capytaine.tools.lru_cache.lru_cache_with_strict_maxsize` and now supports keyword arguments in the memoized function (:pull:`442`).

* Fix Xarray future warning about `Dataset.dims` (:issue:`450` and :pull:`451`).

* Improve some warnings and error messages.

-------------------------------
Expand Down

0 comments on commit f5f0b9f

Please sign in to comment.