Indeed, this passes by org-babel because stderr is not captured, and
scipy does what you suggest. I guess this happens inside compiled
c/Fortran code since there is nothing catching it in the odeint
python function doing that.

Thanks, I will try to bring it up on the scipy list. 

Aaron Ecay <aarone...@gmail.com> writes:

> Hi John,
>
> 2014ko irailak 28an, John Kitchin-ek idatzi zuen:
>
> [...]
>
>> I am not sure why this happens, but it seems like incorrect behavior to
>> me.
>
> In the first case, python exits with a non-zero exit code, whereas in
> the second it exits with a zero code (i.e. successful exit), and prints
> the matrix-thing [[1.], [1.]] to stdout.  It looks like scipy traps the
> NameErrors and prints them to stderr, but continues its computation
> regardless.
>
> I’d say babel is performing as desired here, but scipy sadly isn’t
> reporting its errors in the standard way (by a nonzero exit, which I
> think would happen automatically if the NameErrors made it to the top
> level of the stack without being caught).

-- 
-----------------------------------
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

Reply via email to