yig / PySPQR

Python wrapper for the sparse QR decomposition in SuiteSparseQR.
Creative Commons Zero v1.0 Universal
34 stars 28 forks source link

Update README.md #7

Closed vruge closed 6 years ago

vruge commented 6 years ago

use spsolve_triangular for R\QB

yig commented 6 years ago

I get an error:

>>> result = scipy.sparse.linalg.spsolve_triangular(R, QB, lower=False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/scipy/sparse/linalg/dsolve/linsolve.py", line 512, in spsolve_triangular
    'b must have 1 or 2 dims but its shape is {}.'.format(b.shape))
ValueError: b must have 1 or 2 dims but its shape is ().
vruge commented 6 years ago

You're right, In https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.spsolve_triangular.html#scipy.sparse.linalg.spsolve_triangular b is a numpy.array. I will create a new PR, because I delete the branch for this PR.