[Scipy-tickets] [SciPy] #1175: Return iteration count for iterative linear system methods

SciPy Trac scipy-tickets@scipy....
Mon Jun 7 04:22:47 CDT 2010


#1175: Return iteration count for iterative linear system methods
---------------------------------+------------------------------------------
 Reporter:  alambe               |       Owner:  wnbell
     Type:  enhancement          |      Status:  new   
 Priority:  normal               |   Milestone:  0.8.0 
Component:  scipy.sparse.linalg  |     Version:  0.7.0 
 Keywords:                       |  
---------------------------------+------------------------------------------

Comment(by pch):

 For what it's worth, for those who stumbled against this issue and need a
 quick & dirty fix, there is a way to retrieve the caller's variables:

 import inspect
 parent_locals = inspect.stack()[1][0].f_locals
 iter_ = parent_locals['iter_']
 resid = parent_locals['resid']

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1175#comment:1>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list