[SciPy-User] return "full_output" or how to stop throwing away already calculated results
Tue Mar 9 15:01:31 CST 2010
scipy functions throw away a lot of intermediate results
scipy.linalg.lstsq throws away residuals :
x1 = x[:n]
if rank==n: resids = sum(x[n:]**2,axis=0)
x = x1
in statsmodels, I am switching more to the pattern when
full_output=True (or similar keyword) for a function, then all
intermediate results are returned, attached to a generic class
instance ( or could be a struct in matlab or a bunch for Gael,...)
Is it possible to start the same pattern in scipy?
E.g. for optimizers like slsqp, if we want to change the returns then
each time it breaks the API or we have to increase full_output= 1,2,3
( like nargout in matlab)
I saw linalg.lstsq by chance this morning, but I assume there is
additional useful information hidden in other functions.
Any opinion ?
More information about the SciPy-User