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","]",")",")","]"]
code: def __init__(
      self,
      fh: FORECASTING_HORIZON_TYPES,
      window_length: Optional[ACCEPTED_WINDOW_LENGTH_TYPES] = None,
  ) -> None:
      _check_inputs_for_compatibility(args=[fh, window_length])
      super().__init__(fh=fh, window_length=window_length)
  
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 1 to create a new SingleWindowSplitter object from inherited base classes: BaseSplitter with example: obj = SingleWindowSplitter(fh, window_length)