Skip to content

CartesianIndex version of find/findnz? #20684

Closed
@malmaud

Description

@malmaud

Seems like it would be useful to have a version of find that returns a vector of cartesian indices, in analogy to the new enumerate. findnz is basically a pre-CartesianIndex version of this idea that only happens to work for 2d arrays.

One possible API, in analogy with the enumerate API, is to have find take a singleton-valued first parameter that selects the output format.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrays[a, r, r, a, y, s]collectionsData structures holding multiple items, e.g. setsdesignDesign of APIs or of the language itselfsearch & findThe find* family of functionsspeculativeWhether the change will be implemented is speculative

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions