Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why imposed float64? #5

Open
tianlinxu312 opened this issue Mar 6, 2023 · 0 comments
Open

Why imposed float64? #5

tianlinxu312 opened this issue Mar 6, 2023 · 0 comments

Comments

@tianlinxu312
Copy link

tianlinxu312 commented Mar 6, 2023

In glmnet.py, there's a restriction on the dtype. see below. I'm running with very large dataset, which leads to an extremely big matrix. I'm wondering if there's any specific reason why this has to be float64?

if not( isinstance(x, scipy.sparse.csc.csc_matrix) ):
        if not( isinstance(x, scipy.ndarray) and x.dtype == 'float64'):
            raise ValueError('x input must be a scipy float64 ndarray')
else:
    if not (x.dtype == 'float64'):
        raise ValueError('x input must be a float64 array')
        
if not( isinstance(y, scipy.ndarray) and y.dtype == 'float64'):
        raise ValueError('y input must be a scipy float64 ndarray')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant