Skip to content

Change swap_dims to rename_dims? #2838

Open
@tomchor

Description

@tomchor

Basically I'm trying to swap the names and data (basically the underlying numpy array would be the same, but the coords would change) of two dimensions in my DataArray and I was looking for options that could do that.

So I thought swap_dims would be a good candidate for that given its description but it doesn't work. In fact, based on the docs, I have no idea how to use it and what it does. Based off of issues like this it seems I'm not alone.

Maybe it would be good to add example of usage of this function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions