parameters: (value: Tensor, list_dim: Shape = instance('nonzero'), index_dim: Shape = channel('vector'))
return_statement: return broadcast_op(unbatched_nonzero, [value], iter_dims=value.shape.batch.names)
docstring: Get spatial indices of non-zero / True values.
      
      Batch dimensions are preserved by this operation.
      If channel dimensions are present, this method returns the indices where any component is nonzero.
  
      Implementations:
  
      * NumPy: [`numpy.argwhere`](https://numpy.org/doc/stable/reference/generated/numpy.argwhere.html)
      * PyTorch: [`torch.nonzero`](https://pytorch.org/docs/stable/generated/torch.nonzero.html)
      * TensorFlow: [`tf.where(tf.not_equal(values, 0))`](https://www.tensorflow.org/api_docs/python/tf/where)
      * Jax: [`jax.numpy.nonzero`](https://jax.readthedocs.io/en/latest/_autosummary/jax.numpy.nonzero.html)
  
      Args:
          value: spatial tensor to find non-zero / True values in.
          list_dim: Dimension listing non-zero values.
          index_dim: Index dimension.
  
      Returns:
          `Tensor` of shape (batch dims..., `list_dim`=#non-zero, `index_dim`=value.shape.spatial_rank)
docstring_summary: Get spatial indices of non-zero / True values.
      
      Batch dimensions are preserved by this operation.
      If channel dimensions are present, this method returns the indices where any component is nonzero.
docstring_tokens: Get spatial indices of non - zero / True values . Batch dimensions are preserved by this operation . If channel dimensions are present this method returns the indices where any component is nonzero .
function: def nonzero(value: Tensor, list_dim: Shape = instance('nonzero'), index_dim: Shape = channel('vector')):
      """
      Get spatial indices of non-zero / True values.
      
      Batch dimensions are preserved by this operation.
      If channel dimensions are present, this method returns the indices where any component is nonzero.
  
      Implementations:
  
      * NumPy: [`numpy.argwhere`](https://numpy.org/doc/stable/reference/generated/numpy.argwhere.html)
      * PyTorch: [`torch.nonzero`](https://pytorch.org/docs/stable/generated/torch.nonzero.html)
      * TensorFlow: [`tf.where(tf.not_equal(values, 0))`](https://www.tensorflow.org/api_docs/python/tf/where)
      * Jax: [`jax.numpy.nonzero`](https://jax.readthedocs.io/en/latest/_autosummary/jax.numpy.nonzero.html)
  
      Args:
          value: spatial tensor to find non-zero / True values in.
          list_dim: Dimension listing non-zero values.
          index_dim: Index dimension.
  
      Returns:
          `Tensor` of shape (batch dims..., `list_dim`=#non-zero, `index_dim`=value.shape.spatial_rank)
  
      """
      if value.shape.channel_rank > 0:
          value = sum_(abs(value), value.shape.channel)
  
      def unbatched_nonzero(value: Tensor):
          native = reshaped_native(value, [*value.shape.spatial])
          backend = choose_backend(native)
          indices = backend.nonzero(native)
          indices_shape = Shape(backend.staticshape(indices), (list_dim.name, index_dim.name), (list_dim.type, index_dim.type))
          return NativeTensor(indices, indices_shape)
  
      return broadcast_op(unbatched_nonzero, [value], iter_dims=value.shape.batch.names)
function_tokens: def nonzero ( value : Tensor , list_dim : Shape = instance ( 'nonzero' ) , index_dim : Shape = channel ( 'vector' ) ) : if value . shape . channel_rank > 0 : value = sum_ ( abs ( value ) , value . shape . channel ) def unbatched_nonzero ( value : Tensor ) : native = reshaped_native ( value , [ * value . shape . spatial ] ) backend = choose_backend ( native ) indices = backend . nonzero ( native ) indices_shape = Shape ( backend . staticshape ( indices ) , ( list_dim . name , index_dim . name ) , ( list_dim . type , index_dim . type ) ) return NativeTensor ( indices , indices_shape ) return broadcast_op ( unbatched_nonzero , [ value ] , iter_dims = value . shape . batch . names )