Skip to content

Add argwhere #449

Closed
Closed
@jakirkham

Description

@jakirkham

Currently nonzero is defined in the specification, but argwhere is not. PR ( #23 ) mentions argwhere, but it is not currently included.

There was some discussion starting with comment ( #23 (comment) ) about whether argwhere should be included. Though argwhere was viewed as duplicative, which is understandable.

However for libraries that have arrays with unknown shape elements (like Dask). nonzero can run into some difficulties as the different arrays may not be concatenated (at least not without an explicit override). argwhere avoids this issue as it already returns a single array so there is no need to concatenate and the array can be split apart easily to satisfy the nonzero case ( for example: dask/dask#2539 ). As a result argwhere becomes practically more useful to handle these unknown shape cases.

Would like to discuss adding argwhere to the spec to handle this need

Metadata

Metadata

Assignees

No one assigned

    Labels

    API extensionAdds new functions or objects to the API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions