Return the coordinates of every non-zero element in x.
Thin alias for lucid.nonzero named to match the NumPy /
reference-framework convention. The output is a synchronisation
point on GPU streams — the kernel can't know how many non-zeros
there are without a device→host count.
Parameters
Input tensor of any shape and dtype; zero is determined by the
usual truthiness rules (
0 for numeric dtypes, False for
bool).Returns
TensorShape (N, x.ndim) int64 tensor; row i lists the
multi-dimensional index of the i-th non-zero element in
row-major order.
See Also
lucid.nonzero—the underlying engine call.