# cupy.nonzero¶

cupy.nonzero(a)[source]

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

Returns a tuple of arrays, one for each dimension of a, containing the indices of the non-zero elements in that dimension.

Parameters: a (cupy.ndarray) – array Indices of elements that are non-zero. tuple of arrays