'Aux. function to check input data.'

def _check_Xy(self, X, y=None):

    if (y is not None):
        if ((len(X) != len(y)) or (len(y) < 1)):
            raise ValueError('X    and    y    must    have    the    same    length.')
    if (X.ndim < 3):
        raise ValueError('X    must    have    at    least    3    dimensions.')
