class_docstr: Base class for forecasters that use sliding windows.
class_docstr_tok: ["Base","class","for","forecasters","that","use","sliding","windows","."]
docstr: Select last window.
docstr_tok: ["Select","last","window","."]
code: def _get_last_window(self):
      """Select last window."""
      # Get the start and end points of the last window.
      cutoff = self._cutoff
      start = _shift(cutoff, by=-self.window_length_ + 1)
      cutoff = cutoff[0]
  
      # Get the last window of the endogenous variable.
      y = self._y.loc[start:cutoff].to_numpy()
  
      # If X is given, also get the last window of the exogenous variables.
      X = (
          self._X.loc[start:cutoff].to_numpy()
          if self._X is not None
          else None
      )
  
      return y, X
  
file_path: sktime/sktime/forecasting/base/_sktime.py
imports: import numpy
  import pandas
  from sktime.forecasting.base._base import BaseForecaster
  from sktime.split import CutoffSplitter
  from sktime.utils.datetime import _shift
label_desc: Use image node_id 7 for calling the _BaseWindowForecaster obj's underlying member method code with example usage: obj._get_last_window() and returns: y,  X