[Scipy-tickets] [SciPy] #360: Callback function is broken in linalg.gmres
SciPy
scipy-tickets@scipy....
Sat Nov 29 20:10:27 CST 2008
#360: Callback function is broken in linalg.gmres
--------------------------+-------------------------------------------------
Reporter: nils | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 0.7.0
Component: scipy.linalg | Version: devel
Severity: normal | Resolution:
Keywords: |
--------------------------+-------------------------------------------------
Comment (by pv):
Seems to work (nearly) as expected in Scipy 0.7.0.dev5207:
{{{
270
1.26310356863e-10
||A.x - b|| = 0.753828964374
||A.x - b|| = 0.580550336493
...
||A.x - b|| = 7.25792987592e-10
||A.x - b|| = 7.22835341023e-10
270
The residual by callback is 7.22835341023e-10 but should be
9.68244137814e-11
}}}
The last residual is not passed to the callback, however, but IMHO this is
not really promised in the docstring.
NB: The argument to the callback is the residual itself
{{{
def callback(res):
print "||A.x - b|| = " + str(linalg.norm(res))
data.append(linalg.norm(res))
}}}
--
Ticket URL: <http://scipy.org/scipy/scipy/ticket/360#comment:2>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.
More information about the Scipy-tickets
mailing list