class_docstr: Base forecaster template class.
  
  The base forecaster specifies the methods and method signatures that all forecasters
  have to implement.
  
  Specific implementations of these methods is deferred to concrete forecasters.
class_docstr_tok: ["Base","forecaster","template","class",".","The","base","forecaster","specifies","the","methods","and","method","signatures","that","all","forecasters","have","to","implement",".","Specific","implementations","of","these","methods","is","deferred","to","concrete","forecasters","."]
docstr: Update internal memory of seen training data.
  
  Accesses in self:
  _y : only if exists, then assumed same type as y and same cols
  _X : only if exists, then assumed same type as X and same cols
      these assumptions should be guaranteed by calls
  
  Writes to self:
  _y : same type as y - new rows from y are added to current _y
      if _y does not exist, stores y as _y
  _X : same type as X - new rows from X are added to current _X
      if _X does not exist, stores X as _X
      this is only done if X is not None
  cutoff : is set to latest index seen in y
  
  _y and _X are guaranteed to be one of mtypes:
      pd.DataFrame, pd.Series, np.ndarray, pd-multiindex, numpy3D,
      pd_multiindex_hier
  
  Parameters
  ----------
  y : pd.Series, pd.DataFrame, or np.ndarray (1D or 2D)
      Endogenous time series
  X : pd.DataFrame or 2D np.ndarray, optional (default=None)
      Exogeneous time series
docstr_tok: ["Update","internal","memory","of","seen","training","data",".","Accesses","in","self",":","_y",":","only","if","exists",",","then","assumed","same","type","as","y","and","same","cols","_X",":","only","if","exists",",","then","assumed","same","type","as","X","and","same","cols","these","assumptions","should","be","guaranteed","by","calls","Writes","to","self",":","_y",":","same","type","as","y","-","new","rows","from","y","are","added","to","current","_y","if","_y","does","not","exist",",","stores","y","as","_y","_X",":","same","type","as","X","-","new","rows","from","X","are","added","to","current","_X","if","_X","does","not","exist",",","stores","X","as","_X","this","is","only","done","if","X","is","not","None","cutoff",":","is","set","to","latest","index","seen","in","y","_y","and","_X","are","guaranteed","to","be","one","of","mtypes",":","pd.DataFrame",",","pd.Series",",","np.ndarray",",","pd-multiindex",",","numpy3D",",","pd_multiindex_hier","Parameters","--","--","--","--","--","y",":","pd.Series",",","pd.DataFrame",",","or","np.ndarray","(","1D","or","2D",")","Endogenous","time","series","X",":","pd.DataFrame","or","2D","np.ndarray",",","optional","(","default=None",")","Exogeneous","time","series"]
code: def _update_y_X(self, y, X=None, enforce_index_type=None):
      """Update internal memory of seen training data.
  
      Accesses in self:
      _y : only if exists, then assumed same type as y and same cols
      _X : only if exists, then assumed same type as X and same cols
          these assumptions should be guaranteed by calls
  
      Writes to self:
      _y : same type as y - new rows from y are added to current _y
          if _y does not exist, stores y as _y
      _X : same type as X - new rows from X are added to current _X
          if _X does not exist, stores X as _X
          this is only done if X is not None
      cutoff : is set to latest index seen in y
  
      _y and _X are guaranteed to be one of mtypes:
          pd.DataFrame, pd.Series, np.ndarray, pd-multiindex, numpy3D,
          pd_multiindex_hier
  
      Parameters
      ----------
      y : pd.Series, pd.DataFrame, or np.ndarray (1D or 2D)
          Endogenous time series
      X : pd.DataFrame or 2D np.ndarray, optional (default=None)
          Exogeneous time series
      """
      if y is not None:
          # unwrap y if VectorizedDF
          if isinstance(y, VectorizedDF):
              y = y.X_multiindex
          # if _y does not exist yet, initialize it with y
          if (
              not hasattr(self, "_y")
              or self._y is None
              or not self.is_fitted
          ):
              self._y = y
          else:
              self._y = update_data(self._y, y)
  
          # set cutoff to the end of the observation horizon
          self._set_cutoff_from_y(y)
  
      if X is not None:
          # unwrap X if VectorizedDF
          if isinstance(X, VectorizedDF):
              X = X.X_multiindex
          # if _X does not exist yet, initialize it with X
          if (
              not hasattr(self, "_X")
              or self._X is None
              or not self.is_fitted
          ):
              self._X = X
          else:
              self._X = update_data(self._X, X)
  
imports: from copy import deepcopy
  from itertools import product
  import numpy
  import pandas
  from sktime.base import BaseEstimator
  from sktime.datatypes import VectorizedDF, check_is_scitype, convert_to, get_cutoff, mtype_to_scitype, scitype_to_mtype, update_data
  from sktime.forecasting.base._fh import ForecastingHorizon
  from sktime.utils.datetime import _shift
  from sktime.utils.validation._dependencies import _check_estimator_deps
  from sktime.utils.validation.forecasting import check_alpha, check_cv, check_fh, check_X
  from sktime.utils.validation.series import check_equal_time_index
  from sktime.utils.warnings import warn
label_desc: Use image node_id 23 for calling the BaseForecaster obj's underlying member method code with example usage: obj._update_y_X(y, X, enforce_index_type) without return types