Skip to content

flatten as convinience method for stack all? #1029

@mathause

Description

@mathause

There is a bunch of operations that need to be conducted on a 1D array. It could be handy to have a convinience method that mimicks numpys flatten, i.e. works along the lines:

def flatten(dataarray, name='stacked'):
    return dataarray.stack(**{name: dataarray.dims})

What do you think?

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