[SciPy-User] Ticket #1187: ode crashes if rhs returns a tuple instead of a list
Fri Nov 11 07:38:28 CST 2011
On Thu, Nov 10, 2011 at 9:05 AM, Tony Yu <email@example.com> wrote:
> On Thu, Nov 10, 2011 at 9:39 AM, Bruce Southey <firstname.lastname@example.org> wrote:
>> On 11/09/2011 04:02 PM, Tony Yu 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.
>> SciPy-User mailing listSciPy-User@scipy.orghttp://mail.scipy.org/mailman/listinfo/scipy-user
>> Now I understand, perhaps providing the actual code to the ticket would
>> avoid confusion.
>> Here you are replacing a mutable object with an immutable object so that
>> may be an issue.
> I was thinking the same; for example, if the input function returns an
> array it also works fine. I'm not sure whether the correct behavior is to
> simply cast the tuple to a list or to simply raise a more informative
> error. Unfortunately, I don't understand the C-code well enough to submit a
Looks like a bug in f2py. I've added some comments to the ticket:
> SciPy-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User