[Scipy-tickets] [SciPy] #1187: ode crashes if rhs returns a tuple instead of a list

SciPy Trac scipy-tickets@scipy....
Mon May 31 13:03:14 CDT 2010


#1187: ode crashes if rhs returns a tuple instead of a list
--------------------------------------------------------+-------------------
 Reporter:  miha                                        |       Owner:  somebody
     Type:  defect                                      |      Status:  new     
 Priority:  normal                                      |   Milestone:  0.8.0   
Component:  scipy.integrate                             |     Version:  0.7.0   
 Keywords:  integrade, ode, PyObject_Call, tuple, list  |  
--------------------------------------------------------+-------------------
 I took the example from

 [http://docs.scipy.org/doc/scipy-0.7.x/reference/generated/scipy.integrate.ode.html#scipy.integrate.ode]

 and changed f's return type from list to tuple (i removed [ and ] in f's
 return statement). The example then crashed with the following output:

 {{{
 0-th dimension must be 2 but got 0 (not defined).
 rv_cb_arr is NULL
 Call-back cb_f_in_zvode__user__routines failed.
 Traceback (most recent call last):
   File "proba.py", line 16, in <module>
     r.integrate(r.t+dt)
   File "/usr/lib/python2.6/dist-packages/scipy/integrate/ode.py", line
 260, in integrate
     self.f_params,self.jac_params)
   File "/usr/lib/python2.6/dist-packages/scipy/integrate/ode.py", line
 554, in run
     y1,t,istate = self.runner(*(args[:5]+tuple(self.call_args)+args[5:]))
 SystemError: NULL result without error in PyObject_Call

 shell returned 1
 }}}

 I use scipy 0.7.2.

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


More information about the Scipy-tickets mailing list