docstr: ivy.Array class method variant of ivy.sparsify_tensor. This method
  simply wraps the function, and so the docstring for ivy.sparsify_tensor
  also applies to this method with minimal changes.
  
  Parameters
  ----------
  self : array
      The tensor to sparsify.
  card : int
      The number of values to keep.
  out : array, optional
      Optional output array, for writing the result to.
  
  Returns
  -------
  ret : array
      The sparsified tensor.
  
  Examples
  --------
  >>> x = ivy.arange(100)
  >>> x = ivy.reshape(x, (10, 10))
  >>> x.sparsify_tensor(10)
  ivy.array([[ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
  [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
  [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
  [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
  [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
  [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
  [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
  [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
  [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
  [90, 91, 92, 93, 94, 95, 96, 97, 98, 99]])
docstr_tok: ["ivy.Array","class","method","variant","of","ivy.sparsify_tensor",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","ivy.sparsify_tensor","also","applies","to","this","method","with","minimal","changes",".","Parameters","--","--","--","--","--","self",":","array","The","tensor","to","sparsify",".","card",":","int","The","number","of","values","to","keep",".","out",":","array",",","optional","Optional","output","array",",","for","writing","the","result","to",".","Returns","--","--","--","-","ret",":","array","The","sparsified","tensor",".","Examples","--","--","--","--",">",">",">","x","=","ivy.arange","(","100",")",">",">",">","x","=","ivy.reshape","(","x",",","(","10",",","10",")",")",">",">",">","x.sparsify_tensor","(","10",")","ivy.array","(","[","[","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0","]",",","[","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","0","]",",","[","90",",","91",",","92",",","93",",","94",",","95",",","96",",","97",",","98",",","99","]","]",")"]
code: def sparsify_tensor(
      self: ivy.Array,
      card: int,
      /,
      *,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """ivy.Array class method variant of ivy.sparsify_tensor. This method
      simply wraps the function, and so the docstring for ivy.sparsify_tensor
      also applies to this method with minimal changes.
  
      Parameters
      ----------
      self : array
          The tensor to sparsify.
      card : int
          The number of values to keep.
      out : array, optional
          Optional output array, for writing the result to.
  
      Returns
      -------
      ret : array
          The sparsified tensor.
  
      Examples
      --------
      >>> x = ivy.arange(100)
      >>> x = ivy.reshape(x, (10, 10))
      >>> x.sparsify_tensor(10)
      ivy.array([[ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
      [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
      [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
      [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
      [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
      [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
      [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
      [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
      [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0],
      [90, 91, 92, 93, 94, 95, 96, 97, 98, 99]])
      """
      return ivy.sparsify_tensor(self._data, card, out=out)
  
imports: import abc
  from typing import Optional, Union, Tuple, List, Sequence
  from numbers import Number
  import ivy
label_desc: Use image node_id 28 for calling the _ArrayWithElementWiseExperimental obj's underlying member method code with example usage: obj.sparsify_tensor() and returns: ivy