code: def check_cv(self, y):
          
          y_arr = None
          if self.stratified:
              # Try to convert y to numpy for sklearn's check_cv; if conversion
              # doesn't work, still try.
              try:
                  y_arr = to_numpy(y)
              except (AttributeError, TypeError):
                  y_arr = y
  
          if self._is_float(self.cv):
              return self._check_cv_float()
          return self._check_cv_non_float(y_arr)
docs: Resolve which cross validation strategy is used.