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

Bruce Southey bsouthey@gmail....
Wed Nov 9 21:32:09 CST 2011


On Wed, Nov 9, 2011 at 4:02 PM, Tony Yu <tsyu80@gmail.com> wrote:
> I just want to draw attention to the bug report in
> http://projects.scipy.org/scipy/ticket/1187. Basically, scipy.integrate.ode
> takes a function as input, and the error occurs if that function returns a
> tuple (instead of, e.g., a list).
>
> If there isn't a simple fix (I can't tell b/c the error occurs within
> C-code, which I'm not at all proficient in), then I think this should print
> a more informative error message.
>
> Best,
> -Tony
>

There are 2 full releases and an release candidate since Scipy 0.7.2
was released (2010-04-22).
So, could you please update your numpy and scipy installations accordingly?

Works for scipy.10.0.rc1 (last part below)

Bruce

>>> while r.successful() and r.t < t1:
	r.integrate(r.t+dt)
	print r.t, r.y

	
array([-0.71+0.237j,  0.40+0.j   ])
1.0 [-0.71+0.237j  0.40+0.j   ]
array([ 0.191-0.524j,  0.222+0.j   ])
2.0 [ 0.191-0.524j  0.222+0.j   ]
array([ 0.472+0.527j,  0.154+0.j   ])
3.0 [ 0.472+0.527j  0.154+0.j   ]
array([-0.619+0.307j,  0.118+0.j   ])
4.0 [-0.619+0.307j  0.118+0.j   ]
array([ 0.023-0.614j,  0.095+0.j   ])
5.0 [ 0.023-0.614j  0.095+0.j   ]
array([ 0.586+0.34j,  0.080+0.j  ])
6.0 [ 0.586+0.34j  0.080+0.j  ]
array([-0.521+0.445j,  0.069+0.j   ])
7.0 [-0.521+0.445j  0.069+0.j   ]
array([-0.160-0.612j,  0.061+0.j   ])
8.0 [-0.160-0.612j  0.061+0.j   ]
array([ 0.649+0.15j,  0.054+0.j  ])
9.0 [ 0.649+0.15j  0.054+0.j  ]
array([-0.384+0.564j,  0.049+0.j   ])
10.0 [-0.384+0.564j  0.049+0.j   ]
>>>


More information about the SciPy-User mailing list