class_docstr: Tree class used for predictions.
  
  Parameters
  ----------
  nodes : ndarray of PREDICTOR_RECORD_DTYPE
      The nodes of the tree.
  binned_left_cat_bitsets : ndarray of shape (n_categorical_splits, 8), dtype=uint32
      Array of bitsets for binned categories used in predict_binned when a
      split is categorical.
  raw_left_cat_bitsets : ndarray of shape (n_categorical_splits, 8), dtype=uint32
      Array of bitsets for raw categories used in predict when a split is
      categorical.
class_docstr_tok: ["Tree","class","used","for","predictions",".","Parameters","--","--","--","--","--","nodes",":","ndarray","of","PREDICTOR_RECORD_DTYPE","The","nodes","of","the","tree",".","binned_left_cat_bitsets",":","ndarray","of","shape","(","n_categorical_splits",",","8",")",",","dtype=uint32","Array","of","bitsets","for","binned","categories","used","in","predict_binned","when","a","split","is","categorical",".","raw_left_cat_bitsets",":","ndarray","of","shape","(","n_categorical_splits",",","8",")",",","dtype=uint32","Array","of","bitsets","for","raw","categories","used","in","predict","when","a","split","is","categorical","."]
code: def __setstate__(self, state):
      try:
          super().__setstate__(state)
      except AttributeError:
          self.__dict__.update(state)
  
      # The dtype of feature_idx is np.intp which is platform dependent. Here, we
      # make sure that saving and loading on different bitness systems works without
      # errors. For instance, on a 64 bit Python runtime, np.intp = np.int64,
      # while on 32 bit np.intp = np.int32.
      #
      # TODO: consider always using platform agnostic dtypes for fitted
      # estimator attributes. For this particular estimator, this would
      # mean replacing the intp field of PREDICTOR_RECORD_DTYPE by an int32
      # field. Ideally this should be done consistently throughout
      # scikit-learn along with a common test.
      if self.nodes.dtype != PREDICTOR_RECORD_DTYPE:
          self.nodes = self.nodes.astype(
              PREDICTOR_RECORD_DTYPE, casting="same_kind"
          )
  
file_path: scikit-learn/sklearn/ensemble/_hist_gradient_boosting/predictor.py
imports: import numpy
  from ._predictor import _compute_partial_dependence, _predict_from_binned_data, _predict_from_raw_data
  from .common import PREDICTOR_RECORD_DTYPE, Y_DTYPE
label_desc: Use image node_id 7 for calling the TreePredictor obj's underlying member method code with example usage: obj.__setstate__(state) without return types