cunumeric.flatnonzero#

cunumeric.flatnonzero(a: ndarray) ndarray#

Return indices that are non-zero in the flattened version of a.

This is equivalent to np.nonzero(np.ravel(a))[0].

Parameters:

a (array_like) – Input array.

Returns:

res – Output array, containing the indices of the elements of a.ravel() that are non-zero.

Return type:

ndarray

Availability:

Multiple GPUs, Multiple CPUs