pub fn nonzero<T: Numeric>(x: &Tensor<T>) -> Tensor<i64>
Returns the indices of non-zero elements.
x
Tensor of shape (num_nonzero, ndim) containing indices of non-zero elements