Description
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 concatenate
d (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