Skip to content

scipy.sparse.linalg.lsqr problems #2900

@felixlen

Description

@felixlen

There is a problem with lsqr with certain matrices. A minimal example is given by the following:

scipy.sparse.linalg.lsqr(np.array([1,4]),np.array([1]))

which fails due to acond being 0 and therefore having a float division with 0 in test3 = 1/acond. Changing the matrix a bit to scipy.sparse.linalg.lsqr(np.array([1,5]),np.array([1])) works. Matlab lsqr can handle both.

Furthermore is the output print(msg[0]) in the case arnorm==0 annoying. It should only be printed to stdout if show is set.

Metadata

Metadata

Assignees

Labels

defectA clear bug or issue that prevents SciPy from being installed or used as expectedscipy.sparse.linalg

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions