Skip to content

Check for just ... in stack etc, and raise with a useful error message #6051

@dcherian

Description

@dcherian

Is your feature request related to a problem? Please describe.

The following doesn't work

import xarray as xr

da = xr.DataArray([[1,2],[1,2]], dims=("x", "y"))
da.stack(flat=...)

Describe the solution you'd like
This could be equivalent to

da.stack(flat=da.dims)

I think using ds.dims it should be fine for datasets too.

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