Skip to content

Enh: Support for scipy.sparse.sparray, the sparse array form in scipy.sparse #793

@dschult

Description

@dschult

Please describe the purpose of the new feature or describe the problem to solve.

sparse currently supports __eq__ and __ne__ when the object is an instance of scipy.sparse.spmatrix. But it doesn't support when the object is scipy.sparse.sparray. As scipy.sparse moves toward the sparray interface it will be convenient to be able to do this comparison

Suggest a solution if possible.

The current code e.g. line 431 in sparse._umath.py checks isinstance with scipy.sparse.spmatrix.
That could check both spmatrix and sparray. I'm not sure where else this would need to be changed.

If you have tried alternatives, please describe them below.

No response

Additional information that may help us understand your needs.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions