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

Warren Weckesser warren.weckesser at enthought.com
Fri Nov 11 08:38:28 EST 2011


On Thu, Nov 10, 2011 at 9:05 AM, Tony Yu <tsyu80 at gmail.com> wrote:

>
>
> On Thu, Nov 10, 2011 at 9:39 AM, Bruce Southey <bsouthey at gmail.com> 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.
>>
>>
>> Best,
>> -Tony
>>
>>
>> _______________________________________________
>> SciPy-User mailing listSciPy-User at scipy.orghttp://mail.scipy.org/mailman/listinfo/scipy-user
>>
>>  Ah
>> 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
> patch.
>
>


Looks like a bug in f2py.  I've added some comments to the ticket:
http://projects.scipy.org/scipy/ticket/1187

Warren




> Best,
> -Tony
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20111111/fa651b27/attachment.html>


More information about the SciPy-Dev mailing list