code: def _check_y_exog(y, exog):
          
          # Do not force finite, since a transformer's goal may be imputation.
          if y is not None:
              y = column_or_1d(
                  check_array(y, ensure_2d=False, dtype=DTYPE, copy=True,
                              force_all_finite=False))
          if exog is not None:
              exog = check_array(exog, ensure_2d=True, dtype=DTYPE,
                                 copy=True, force_all_finite=False)
          return y, exog
docs: Validate input