class_docstr: Base class for sliding and expanding window splitter.
docstr: Get train/test splits for non-empty initial window.
  
  Parameters
  ----------
  y : pd.Index
      Index of the time series to split
  
  Returns
  -------
  (np.ndarray, np.ndarray)
      Integer indices of the train/test windows
docstr_tok: ["Get","train\/test","splits","for","non-empty","initial","window",".","Parameters","--","--","--","--","--","y",":","pd.Index","Index","of","the","time","series","to","split","Returns","--","--","--","-","(","np.ndarray",",","np.ndarray",")","Integer","indices","of","the","train\/test","windows"]
code: def _split_for_initial_window(self, y: pd.Index) -> SPLIT_ARRAY_TYPE:
      """Get train/test splits for non-empty initial window.
  
      Parameters
      ----------
      y : pd.Index
          Index of the time series to split
  
      Returns
      -------
      (np.ndarray, np.ndarray)
          Integer indices of the train/test windows
      """
      fh = _check_fh(self.fh)
      if not self.start_with_window:
          raise ValueError(
              "`start_with_window` must be True if `initial_window` is given"
          )
      if self._initial_window <= self.window_length:
          raise ValueError(
              "`initial_window` must greater than `window_length`"
          )
      if is_int(x=self._initial_window):
          end = self._initial_window
      else:
          end = y.get_loc(y[0] + self._initial_window)
      train = self._get_train_window(
          y=y, train_start=0, split_point=end
      )
      if array_is_int(fh):
          test = end + fh.to_numpy() - 1
      else:
          test = np.argwhere(y.isin(y[end - 1] + fh)).flatten()
      return train, test
  
imports: from typing import Optional
  import numpy
  import pandas
  from sktime.datatypes._utilities import get_index_for_series
  from sktime.forecasting.base import ForecastingHorizon
  from sktime.split.base import BaseSplitter
  from sktime.split.base._common import ACCEPTED_Y_TYPES, FORECASTING_HORIZON_TYPES, SPLIT_ARRAY_TYPE, SPLIT_GENERATOR_TYPE, _check_fh, _check_inputs_for_compatibility, _get_end
  from sktime.utils.validation import ACCEPTED_WINDOW_LENGTH_TYPES, NON_FLOAT_WINDOW_LENGTH_TYPES, array_is_int, check_window_length, is_int, is_timedelta_or_date_offset
  from sktime.utils.validation.forecasting import check_step_length
label_desc: Use image node_id 4 for calling the BaseWindowSplitter obj's underlying member method code with example usage: obj._split_for_initial_window(y) and returns: train,  test