class_docstr: Single window splitter.
  
  Split time series once into a training and test set.
  See more details on what to expect from this splitter in :class:`BaseSplitter`.
  
  Test window is defined by forecasting horizons
  relative to the end of the training window.
  It will contain as many indices
  as there are forecasting horizons provided to the `fh` argument.
  For a forecasating horizon :math:`(h_1,\ldots,h_H)`, the training window will
  consist of the indices :math:`(k_n+h_1,\ldots,k_n+h_H)`.
  
  Parameters
  ----------
  fh : int, list or np.array
      Forecasting horizon
  window_length : int or timedelta or pd.DateOffset
      Window length
  
  Examples
  --------
  >>> import numpy as np
  >>> from sktime.split import SingleWindowSplitter
  >>> ts = np.arange(10)
  >>> splitter = SingleWindowSplitter(fh=[2, 4], window_length=3)
  >>> list(splitter.split(ts)) # doctest: +SKIP
  [(array([3, 4, 5]), array([7, 9]))]
class_docstr_tok: ["Single","window","splitter",".","Split","time","series","once","into","a","training","and","test","set",".","See","more","details","on","what","to","expect","from","this","splitter","in",":","class",":","`","BaseSplitter","`",".","Test","window","is","defined","by","forecasting","horizons","relative","to","the","end","of","the","training","window",".","It","will","contain","as","many","indices","as","there","are","forecasting","horizons","provided","to","the","`","fh","`","argument",".","For","a","forecasating","horizon",":","math",":","`","(","h_1",",","\\ldots",",","h_H",")","`",",","the","training","window","will","consist","of","the","indices",":","math",":","`","(","k_n+h_1",",","\\ldots",",","k_n+h_H",")","`",".","Parameters","--","--","--","--","--","fh",":","int",",","list","or","np.array","Forecasting","horizon","window_length",":","int","or","timedelta","or","pd.DateOffset","Window","length","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","sktime.split","import","SingleWindowSplitter",">",">",">","ts","=","np.arange","(","10",")",">",">",">","splitter","=","SingleWindowSplitter","(","fh=","[","2",",","4","]",",","window_length=3",")",">",">",">","list","(","splitter.split","(","ts",")",")","#","doctest",":","+SKIP","[","(","array","(","[","3",",","4",",","5","]",")",",","array","(","[","7",",","9","]",")",")","]"]
docstr: Return the cutoff points in .iloc[] context.
  
  Since this splitter returns a single train/test split,
  this method returns a single one-dimensional array
  with the last train set index.
  
  Parameters
  ----------
  y : pd.Series or pd.Index, optional (default=None)
      Time series to split
  
  Returns
  -------
  cutoffs : 1D np.ndarray of int
      iloc location indices, in reference to y, of cutoff indices
docstr_tok: ["Return","the","cutoff","points","in",".iloc","[","]","context",".","Since","this","splitter","returns","a","single","train\/test","split",",","this","method","returns","a","single","one-dimensional","array","with","the","last","train","set","index",".","Parameters","--","--","--","--","--","y",":","pd.Series","or","pd.Index",",","optional","(","default=None",")","Time","series","to","split","Returns","--","--","--","-","cutoffs",":","1D","np.ndarray","of","int","iloc","location","indices",",","in","reference","to","y",",","of","cutoff","indices"]
code: def get_cutoffs(
      self, y: Optional[ACCEPTED_Y_TYPES] = None
  ) -> np.ndarray:
      """Return the cutoff points in .iloc[] context.
  
      Since this splitter returns a single train/test split,
      this method returns a single one-dimensional array
      with the last train set index.
  
      Parameters
      ----------
      y : pd.Series or pd.Index, optional (default=None)
          Time series to split
  
      Returns
      -------
      cutoffs : 1D np.ndarray of int
          iloc location indices, in reference to y, of cutoff indices
      """
      if y is None:
          raise ValueError(
              f"{self.__class__.__name__} requires `y` to compute the cutoffs."
          )
      fh = _check_fh(self.fh)
      y = get_index_for_series(y)
      end = _get_end(y_index=y, fh=fh)
      return np.array([end])
  
file_path: sktime/sktime/split/singlewindow.py
imports: from typing import Optional
  import numpy
  import pandas
  from sktime.datatypes._utilities import get_index_for_series
  from sktime.split.base import BaseSplitter
  from sktime.split.base._common import ACCEPTED_Y_TYPES, FORECASTING_HORIZON_TYPES, SPLIT_GENERATOR_TYPE, _check_fh, _check_inputs_for_compatibility, _get_end, _get_train_window_via_endpoint
  from sktime.utils.validation import ACCEPTED_WINDOW_LENGTH_TYPES, array_is_int, check_window_length
label_desc: Use image node_id 4 for calling the SingleWindowSplitter obj's underlying member method code with example usage: obj.get_cutoffs(y) and returns: np