You should check the input X and y here. The input X could be made to accept numpy arrays or CSR sparse matrices with:

        X = atleast2d_or_csr(X)