Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataArray.rename docu missing renaming of dimensions #5458

Closed
headtr1ck opened this issue Jun 10, 2021 · 0 comments · Fixed by #6665
Closed

DataArray.rename docu missing renaming of dimensions #5458

headtr1ck opened this issue Jun 10, 2021 · 0 comments · Fixed by #6665

Comments

@headtr1ck
Copy link
Collaborator

What happened:
http://xarray.pydata.org/en/stable/generated/xarray.DataArray.rename.html#xarray.DataArray.rename
states that:

Returns a new DataArray with renamed coordinates or a new name.

What you expected to happen:
It should state:
"Returns a new DataArray with renamed coordinates, dimensions or a new name."
Since it definitely can do that.

Minimal example

xr.DataArray([1, 2, 3]).rename({"dim_0": "new"})

Further
While at it: Dataset.rename als does not mention explicitly that you can rename coordinates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants