[SciPy-User] capturing stdout, stderr from integrate.odeint() ?

RKBelew rik@cogsci.ucsd....
Mon Jan 14 19:13:48 CST 2013

i'm trying to capture the various warnings being generated
by lsoda from the FORTRAN library odepack, ala

> lsoda--  warning..internal t (=r1) and h (=r2) are
>        such that in the machine, t + h = t on the next step
>        (h = step size). solver will continue anyway
>       In above,  R1 =  0.2867368005697E+02   R2 =  0.1738483517440E-14

my strategy has been to just redirect sys.stdout and/or sys.stderr
to a StringIO() buffer and then explore it.  but that isn't working:
i still get the warnings, and my buffer remains empty?

can someone point me to where in the guts of scipy.integrate
this might be resolved, and/or why my approach isn't working?

thanks for your help.


More information about the SciPy-User mailing list