def check_input(X):
    """
    Raise a clear error if X is a pandas dataframe
    and check array according to scikit rules
    """
    if isinstance(X, (pd.DataFrame, pd.Series)):
        err_message = "Pandas DataFrame are not supported: apply X.values when calling fit"
        raise TypeError(err_message)
    check_array(X, accept_sparse=True)

    Raise a clear error if X is a pandas dataframe
    and check array according to scikit rules
    
pytorch_tabnet/utils.py