Skip to content

Some simple broadcast_dim method? #2267

Closed
@Hoeze

Description

@Hoeze

I've already found xr.broadcast(arrays).
However, I'd like to just add a new dimension with a specific size to one DataArray.
I could not find any simple option to do this.

If there is no such option:

  • add a size parameter to DataArray.expand_dims?
  • DataArray.broadcast_dims({"a": M, "b": N})?

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