nonzero

dragon.nonzero(
  inputs,
  **kwargs
)[source]

Return the indices of non-zero elements.

\[y = \{i, \text{ if } x[i] \text{ is True }\} \]
Parameters:
Returns:

dragon.Tensor – The output tensor.