dask 2021.10.0

NotesParametersReturnsBackRef
argwhere(a)

This docstring was copied from numpy.argwhere.

Some inconsistencies with the Dask version may exist.

Notes

np.argwhere(a) is almost the same as np.transpose(np.nonzero(a)) , but produces a result of the correct shape for a 0D array.

The output of argwhere is not suitable for indexing arrays. For this purpose use nonzero(a) instead.

Parameters

a : array_like

Input data.

Returns

index_array : (N, a.ndim) ndarray

Indices of elements that are non-zero. Indices are grouped by element. This array will have shape (N, a.ndim) where N is the number of non-zero items.

Find the indices of array elements that are non-zero, grouped by element.

See Also

nonzero
where

Examples

This example is valid syntax, but we were not able to check execution
>>> x = np.arange(6).reshape(2,3)  # doctest: +SKIP
... x # doctest: +SKIP array([[0, 1, 2], [3, 4, 5]])
This example is valid syntax, but we were not able to check execution
>>> np.argwhere(x>1)  # doctest: +SKIP
array([[0, 2],
       [1, 0],
       [1, 1],
       [1, 2]])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

dask.array.routines.nonzero

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/array/routines.py#2008
type: <class 'function'>
Commit: