def check_X_y(X, y, accept_sparse=None, dtype="numeric", order=None, copy=False,
              force_all_finite=True, ensure_2d=True, allow_nd=False,
              multi_output=False, ensure_min_samples=1,
              ensure_min_features=1, y_numeric=False):
    X = check_array(X, accept_sparse, dtype, order, copy, force_all_finite,
                    ensure_2d, allow_nd, ensure_min_samples,
                    ensure_min_features)
    if multi_output:
        y = check_array(y, 'csr', force_all_finite=True, ensure_2d=False,
                        dtype=None)
    else:
        y = column_or_1d(y, warn=True)
        _assert_all_finite(y)
    if y_numeric and y.dtype.kind == 'O':
        y = y.astype(np.float64)

    check_consistent_length(X, y)

    return X, y
Input validation for standard estimators.
dataset/ETHPy150Open trevorstephens/gplearn/gplearn/skutils/validation.py/check_X_y