Skip to content

Commit

Permalink
Removed overwriting of RHS which may affect solution
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffrey-hokanson committed Nov 12, 2020
1 parent 6e5581b commit c149ced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polyrat/vecfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
def _solve_linearized_vecfit(num_basis, denom_basis, y):
A = np.hstack([ num_basis, -(denom_basis[:,1:].T * y).T ])
b = y
x, res, rank, s = scipy.linalg.lstsq(A, b, overwrite_a = True, overwrite_b = True)
x, res, rank, s = scipy.linalg.lstsq(A, b, overwrite_a = True, overwrite_b = False)
a = x[0:num_basis.shape[1]]
b = np.hstack([1, x[num_basis.shape[1]:]])
return a, b, s[0]/s[-1]
Expand Down

0 comments on commit c149ced

Please sign in to comment.