class_docstr: An encapsulation of the structure of a single decision tree
  Contains no logic, but keeps track of 4 different kinds of nodes within the tree:
    - leaf nodes
    - decision nodes
    - splittable leaf nodes
    - prunable decision nodes
  
  Parameters
  ----------
  nodes: List[Node]
      All nodes contained in the tree, i.e. decision and leaf nodes
class_docstr_tok: ["An","encapsulation","of","the","structure","of","a","single","decision","tree","Contains","no","logic",",","but","keeps","track","of","4","different","kinds","of","nodes","within","the","tree",":","-","leaf","nodes","-","decision","nodes","-","splittable","leaf","nodes","-","prunable","decision","nodes","Parameters","--","--","--","--","--","nodes",":","List","[","Node","]","All","nodes","contained","in","the","tree",",","i.e",".","decision","and","leaf","nodes"]
docstr: Update the cached value of the target array in all nodes
  Used to pass in the residuals from the sum of all of the other trees
docstr_tok: ["Update","the","cached","value","of","the","target","array","in","all","nodes","Used","to","pass","in","the","residuals","from","the","sum","of","all","of","the","other","trees"]
code: def update_y(self, y: np.ndarray) -> None:
      """
      Update the cached value of the target array in all nodes
      Used to pass in the residuals from the sum of all of the other trees
      """
      self.cache_up_to_date = False
      for node in self.nodes:
          node.update_y(y)
  
file_path: imodels/imodels/experimental/bartpy/tree.py
imports: from typing import List
  import numpy
  from .mutation import TreeMutation
  from .node import TreeNode, LeafNode, DecisionNode, deep_copy_node
label_desc: Use image node_id 7 for calling the Tree obj's underlying member method code with example usage: obj.update_y(y) without return types