docstr: ivy.Array instance method variant of ivy.hardshrink. This method
  simply wraps the function, and so the docstring for ivy.hardshrink also
  applies to this method with minimal changes.
  
  Parameters
  ----------
  self
      input array.
  lambd
      the lambd value for the Hardshrink formulation
  out
      optional output array, for writing the result to. It must have a shape
      that the inputs broadcast to.
  
  Returns
  -------
  ret
      an array with the hardshrink activation function applied element-wise.
  
  Examples
  --------
  >>> x = ivy.array([-1., 0., 1.])
  >>> y = x.hardshrink()
  >>> print(y)
  ivy.array([-1.,  0.,  1.])
  >>> x = ivy.array([-1., 0., 1.])
  >>> y = x.hardshrink(lambd=1.0)
  >>> print(y)
  ivy.array([0., 0., 0.])
docstr_tok: ["ivy.Array","instance","method","variant","of","ivy.hardshrink",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","ivy.hardshrink","also","applies","to","this","method","with","minimal","changes",".","Parameters","--","--","--","--","--","self","input","array",".","lambd","the","lambd","value","for","the","Hardshrink","formulation","out","optional","output","array",",","for","writing","the","result","to",".","It","must","have","a","shape","that","the","inputs","broadcast","to",".","Returns","--","--","--","-","ret","an","array","with","the","hardshrink","activation","function","applied","element-wise",".","Examples","--","--","--","--",">",">",">","x","=","ivy.array","(","[","-1.",",","0.",",","1",".","]",")",">",">",">","y","=","x.hardshrink","(",")",">",">",">","print","(","y",")","ivy.array","(","[","-1.",",","0.",",","1",".","]",")",">",">",">","x","=","ivy.array","(","[","-1.",",","0.",",","1",".","]",")",">",">",">","y","=","x.hardshrink","(","lambd=1.0",")",">",">",">","print","(","y",")","ivy.array","(","[","0.",",","0.",",","0",".","]",")"]
code: def hardshrink(
      self: ivy.Array,
      /,
      *,
      lambd: float = 0.5,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """ivy.Array instance method variant of ivy.hardshrink. This method
      simply wraps the function, and so the docstring for ivy.hardshrink also
      applies to this method with minimal changes.
  
      Parameters
      ----------
      self
          input array.
      lambd
          the lambd value for the Hardshrink formulation
      out
          optional output array, for writing the result to. It must have a shape
          that the inputs broadcast to.
  
      Returns
      -------
      ret
          an array with the hardshrink activation function applied element-wise.
  
      Examples
      --------
      >>> x = ivy.array([-1., 0., 1.])
      >>> y = x.hardshrink()
      >>> print(y)
      ivy.array([-1.,  0.,  1.])
      >>> x = ivy.array([-1., 0., 1.])
      >>> y = x.hardshrink(lambd=1.0)
      >>> print(y)
      ivy.array([0., 0., 0.])
      """
      return ivy.hardshrink(self._data, lambd=lambd, out=out)
  
file_path: ivy/ivy/data_classes/array/experimental/activations.py
imports: import abc
  from typing import Optional, Union, Literal
  import ivy
label_desc: Use image node_id 15 for calling the _ArrayWithActivationsExperimental obj's underlying member method code with example usage: obj.hardshrink() and returns: ivy