syntax error in misc.py
Closed this issue · 1 comments
GoogleCodeExporter commented
I think the matlab matrix left division operator "\" left in misc.py should be
changed from "(I-B*A)\e" to "linalg.solve((I-B*A),e)"
diff:
Index: misc.py
===================================================================
--- misc.py (revision 103)
+++ misc.py (working copy)
@@ -10,7 +10,7 @@
array, asarray, broadcast_arrays, ceil, floor, frexp, hypot,
sqrt, arctan2, sin, cos, exp, log, mod, diff, empty_like,
finfo, inf, pi, interp, isnan, isscalar, zeros, ones,
- r_, sign, unique, hstack, vstack, nonzero, where, extract)
+ r_, sign, unique, hstack, vstack, nonzero, where, extract,
linalg)
from scipy.special import gammaln
from scipy.integrate import trapz, simps
import types
@@ -728,7 +728,7 @@
if nA==1:
fx=NN*(A/(1-B*A)*e)
else:
- fx=NN*(A*((I-B*A)\e)) #least squares
+ fx=NN*(A*(linalg.solve((I-B*A),e))) #least squares
#end
#end
Original issue reported on code.google.com by charles....@gmail.com
on 4 Jun 2011 at 1:55
GoogleCodeExporter commented
Fixed in revision 104
Original comment by Per.Andreas.Brodtkorb@gmail.com
on 7 Jun 2011 at 3:53
- Changed state: Fixed