Skip to content

Why imposed float64?  #5

@tianlinxu312

Description

@tianlinxu312

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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions