Skip to content

DataArray.rename docu missing renaming of dimensions #5458

Closed
@headtr1ck

Description

@headtr1ck

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions