docstr: Set the values of a shared variable to 0.
  
  Parameters
  ----------
  borrow
      ``True`` to modify the value of a shared variable directly by using
      its previous value. Potentially this can cause problems regarding
      to the aliased memory.
  
  Changes done with this function will be visible to all functions using
  this `SharedVariable`.
docstr_tok: ["Set","the","values","of","a","shared","variable","to","0",".","Parameters","--","--","--","--","--","borrow","``","True","``","to","modify","the","value","of","a","shared","variable","directly","by","using","its","previous","value",".","Potentially","this","can","cause","problems","regarding","to","the","aliased","memory",".","Changes","done","with","this","function","will","be","visible","to","all","functions","using","this","`","SharedVariable","`","."]
code: def zero(self, borrow: bool = False):
      r"""Set the values of a shared variable to 0.
  
      Parameters
      ----------
      borrow
          ``True`` to modify the value of a shared variable directly by using
          its previous value. Potentially this can cause problems regarding
          to the aliased memory.
  
      Changes done with this function will be visible to all functions using
      this `SharedVariable`.
  
      """
      if borrow:
          self.container.value[...] = 0
      else:
          self.container.value = 0 * self.container.value
  
file_path: pytensor/pytensor/tensor/sharedvar.py
imports: import warnings
  import numpy
  from pytensor.compile import SharedVariable, shared_constructor
  from pytensor.misc.safe_asarray import _asarray
  from pytensor.tensor import _get_vector_length
  from pytensor.tensor.type import TensorType
  from pytensor.tensor.variable import _tensor_py_operators
label_desc: Use image node_id 1 for calling the TensorSharedVariable obj's underlying member method code with example usage: obj.zero(borrow) without return types