Skip to content

Consider adding nonzero/flatnonzero to dask.array #1076

@shoyer

Description

@shoyer

This would need to eagerly evaluated, or perhaps return an imperative value, because the result shape is not known apriori.

This sort of thing could be useful for pydata/xarray#815 if you want to mask out a small region of a very large array. For example, imagine you have a tiled digital elevation model dataset at high resolution covering the globe, and now you want to extract out the region corresponding to California. There are certainly more intelligent indexing strategies for geospatial data, but I could see something like ds.sel_where(ds.region_enum == CALIFORNIA) being convenient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions