class_docstr: Represents a symbolic input for use with function or FunctionMaker.
  
  Parameters
  ----------
  variable : a Variable instance
      This will be assigned a value before running the function, not computed
      from its owner.
  name : Any type
      If autoname=True, defaults to variable.name.
      If name is a valid Python identifier, this input can be set by kwarg,
      and its value can be accessed by self.<name>.
  value : Any type
      The initial/default value for this input. If update is None,
      this input acts just like an argument with a default value in
      Python. If update is not None, changes to this value will
      "stick around", whether due to an update or a user's explicit
      action.
  update : Variable instance
      Defaults to None. Value (see previous) will be replaced with this
      expression variable after each function call. If update is None, the
      update will be the default value of the input.
  mutable : bool
      Defaults to False if update is None, True if update is not None.
      True: permit the compiled function to modify the python object
      being passed as the input.
      False: do not permit the compiled function to modify the
      python object being passed as the input.
  borrow : bool
      Default : take the same value as mutable.
      True: permit the output of the compiled function to be aliased
      to the input.
      False: do not permit any output to be aliased to the input.
  strict : bool
      Defaults to False.
      True: means that the value you pass for this input must have exactly
      the right type.
      False: the value you pass for this input may be cast automatically to
      the proper type.
  allow_downcast : bool or None
      Defaults to None. Only applies when `strict` is False.
      True: the value you pass for this input can be silently downcasted to
      fit the right type, which may lose precision.
      False: the value will only be cast to a more general, or precise, type.
      None: Almost like False, but allows downcast of Python floats to floatX.
  autoname : bool
      Defaults to True. See the name option.
  implicit : bool or None
      Defaults to None.
      True: This input is implicit in the sense that the user is not allowed
      to provide a value for it. Requires 'value' to be set.
      False: The user can provide a value for this input. Be careful when
      'value' is a container, because providing an input value will
      overwrite the content of this container.
      None: Automatically choose between True or False depending on the
      situation. It will be set to False in all cases except if 'value' is a
      container (so that there is less risk of accidentally overwriting its
      content without being aware of it).
class_docstr_tok: ["Represents","a","symbolic","input","for","use","with","function","or","FunctionMaker",".","Parameters","--","--","--","--","--","variable",":","a","Variable","instance","This","will","be","assigned","a","value","before","running","the","function",",","not","computed","from","its","owner",".","name",":","Any","type","If","autoname=True",",","defaults","to","variable.name",".","If","name","is","a","valid","Python","identifier",",","this","input","can","be","set","by","kwarg",",","and","its","value","can","be","accessed","by","self.","<","name",">",".","value",":","Any","type","The","initial\/default","value","for","this","input",".","If","update","is","None",",","this","input","acts","just","like","an","argument","with","a","default","value","in","Python",".","If","update","is","not","None",",","changes","to","this","value","will","``","stick","around","''",",","whether","due","to","an","update","or","a","user","'s","explicit","action",".","update",":","Variable","instance","Defaults","to","None",".","Value","(","see","previous",")","will","be","replaced","with","this","expression","variable","after","each","function","call",".","If","update","is","None",",","the","update","will","be","the","default","value","of","the","input",".","mutable",":","bool","Defaults","to","False","if","update","is","None",",","True","if","update","is","not","None",".","True",":","permit","the","compiled","function","to","modify","the","python","object","being","passed","as","the","input",".","False",":","do","not","permit","the","compiled","function","to","modify","the","python","object","being","passed","as","the","input",".","borrow",":","bool","Default",":","take","the","same","value","as","mutable",".","True",":","permit","the","output","of","the","compiled","function","to","be","aliased","to","the","input",".","False",":","do","not","permit","any","output","to","be","aliased","to","the","input",".","strict",":","bool","Defaults","to","False",".","True",":","means","that","the","value","you","pass","for","this","input","must","have","exactly","the","right","type",".","False",":","the","value","you","pass","for","this","input","may","be","cast","automatically","to","the","proper","type",".","allow_downcast",":","bool","or","None","Defaults","to","None",".","Only","applies","when","`","strict","`","is","False",".","True",":","the","value","you","pass","for","this","input","can","be","silently","downcasted","to","fit","the","right","type",",","which","may","lose","precision",".","False",":","the","value","will","only","be","cast","to","a","more","general",",","or","precise",",","type",".","None",":","Almost","like","False",",","but","allows","downcast","of","Python","floats","to","floatX",".","autoname",":","bool","Defaults","to","True",".","See","the","name","option",".","implicit",":","bool","or","None","Defaults","to","None",".","True",":","This","input","is","implicit","in","the","sense","that","the","user","is","not","allowed","to","provide","a","value","for","it",".","Requires","'value","'","to","be","set",".","False",":","The","user","can","provide","a","value","for","this","input",".","Be","careful","when","'value","'","is","a","container",",","because","providing","an","input","value","will","overwrite","the","content","of","this","container",".","None",":","Automatically","choose","between","True","or","False","depending","on","the","situation",".","It","will","be","set","to","False","in","all","cases","except","if","'value","'","is","a","container","(","so","that","there","is","less","risk","of","accidentally","overwriting","its","content","without","being","aware","of","it",")","."]
code: def __init__(
      self,
      variable,
      name=None,
      value=None,
      update=None,
      mutable=None,
      strict=False,
      allow_downcast=None,
      autoname=True,
      implicit=None,
      borrow=None,
      shared=False,
  ):
      # if shared, an input's value comes from its persistent
      # storage, not from a default stored in the function or from
      # the caller
      self.shared = shared
  
      if borrow is None:
          self.borrow = mutable
      else:
          self.borrow = borrow
  
      # mutable implies the output can be both aliased to the input and that
      # the input can be destroyed. borrow simply implies the output can be
      # aliased to the input. Thus mutable=True should require borrow=True.
      if mutable and not self.borrow:
          raise ValueError(
              f"Symbolic input for variable {variable} (name={name}) has "
              "flags mutable=True, borrow=False. This combination is "
              "incompatible since mutable=True implies that the "
              "input variable may be both aliased (borrow=True) and "
              "overwritten.",
          )
  
      if implicit is None:
          from pytensor.compile.sharedvalue import SharedVariable
  
          implicit = isinstance(value, Container) or isinstance(
              value, SharedVariable
          )
      super().__init__(
          variable=variable,
          name=name,
          update=update,
          mutable=mutable,
          strict=strict,
          allow_downcast=allow_downcast,
          autoname=autoname,
          implicit=implicit,
      )
      self.value = value
      if self.implicit and value is None:
          raise TypeError(
              "An implicit input must be given a default value"
          )
  
file_path: pytensor/pytensor/compile/io.py
imports: import logging
  from pytensor.link.basic import Container
label_desc: Use image node_id 1 to create a new In object from inherited base classes: SymbolicInput with example: obj = In(variable, name, value, update, mutable, strict, allow_downcast, autoname, implicit, borrow, shared)