Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug in LSQR when b=0.

  • Loading branch information...
commit 7cbe508ec2f4a83d3047d67c3b21a96ca72b7d96 1 parent 67e06a5
@dpo authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  pykrylov/lls/lsqr.py
View
3  pykrylov/lls/lsqr.py
@@ -209,7 +209,8 @@ def solve(self, rhs, itnlim=0, damp=0.0, M=None, N=None, atol=1.0e-9,
if show:
print ' '
print head1+head2
- test1 = 1.0; test2 = alpha / beta
+ test1 = 1.0
+ test2 = alpha / beta if not x_is_zero else 1.0
str1 = '%6g %12.5e' % (itn, x[0])
str2 = ' %10.3e %10.3e' % (r1norm, r2norm)
str3 = ' %8.1e %8.1e' % (test1, test2)
Please sign in to comment.
Something went wrong with that request. Please try again.