class_docstr: Base class for all cross-validators
  
  Implementations must define `_iter_test_masks` or `_iter_test_indices`.
docstr: Generate indices to split data into training and test set.
  
  Parameters
  ----------
  X : array-like of shape (n_samples, n_features)
      Training data, where n_samples is the number of samples
      and n_features is the number of features.
  
  y : array-like of shape (n_samples,)
      The target variable for supervised learning problems.
  
  groups : array-like of shape (n_samples,), default=None
      Group labels for the samples used while splitting the dataset into
      train/test set.
  
  Yields
  ------
  train : ndarray
      The training set indices for that split.
  
  test : ndarray
      The testing set indices for that split.
docstr_tok: ["Generate","indices","to","split","data","into","training","and","test","set",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_samples",",","n_features",")","Training","data",",","where","n_samples","is","the","number","of","samples","and","n_features","is","the","number","of","features",".","y",":","array-like","of","shape","(","n_samples",",",")","The","target","variable","for","supervised","learning","problems",".","groups",":","array-like","of","shape","(","n_samples",",",")",",","default=None","Group","labels","for","the","samples","used","while","splitting","the","dataset","into","train\/test","set",".","Yields","--","--","--","train",":","ndarray","The","training","set","indices","for","that","split",".","test",":","ndarray","The","testing","set","indices","for","that","split","."]
code: def split(self, X, y=None, groups=None):  # pragma: no cover
      """Generate indices to split data into training and test set.
  
      Parameters
      ----------
      X : array-like of shape (n_samples, n_features)
          Training data, where n_samples is the number of samples
          and n_features is the number of features.
  
      y : array-like of shape (n_samples,)
          The target variable for supervised learning problems.
  
      groups : array-like of shape (n_samples,), default=None
          Group labels for the samples used while splitting the dataset into
          train/test set.
  
      Yields
      ------
      train : ndarray
          The training set indices for that split.
  
      test : ndarray
          The testing set indices for that split.
      """
      X, y, groups = indexable(X, y, groups)
      indices = mt.arange(_num_samples(X))
      for test_index in self._iter_test_masks(X, y, groups):
          train_index = indices[mt.logical_not(test_index)]
          test_index = indices[test_index]
          yield train_index, test_index
  
imports: import numbers
  from abc import ABCMeta, abstractmethod
  from itertools import chain
  from math import ceil, floor
  import numpy
  from ...core import ExecutableTuple
  from ...None import tensor
  from ...tensor.utils import check_random_state
  from ..utils import shuffle
  from ..utils.validation import indexable, _num_samples
label_desc: Use image node_id 1 for calling the BaseCrossValidator obj's underlying member method code with example usage: obj.split(X, y, groups) without return types