chainerx.nonzero

chainerx.nonzero(a)

Return the indices of the elements that are non-zero.

Parameters

a (ndarray) – Input array.

Returns

Indices of elements that are non-zero.

Return type

tuple of ndarray()

Note

During backpropagation, this function does not propagate gradients.

See also

numpy.nonzero()