'Check inputs before fit and transform'

def _check_inputs(self, X, accept_sparse_negative=False):

    X = check_array(X, accept_sparse='csc', copy=self.copy, dtype=[np.float64, np.float32])
    if ((not accept_sparse_negative) and (not self.ignore_implicit_zeros) and (sparse.issparse(X) and np.any((X.data < 0)))):
        raise ValueError('QuantileTransformer    only    accepts    non-negative    sparse    matrices.')
    if (self.output_distribution not in ('normal', 'uniform')):
        raise ValueError("'output_distribution'    has    to    be    either    'normal'    or    'uniform'.    Got    '{}'    instead.".format(self.output_distribution))
    return X
