# [SciPy-User] SciPy-User Digest, Vol 86, Issue 11

Justin Bois justinbois@gmail....
Wed Oct 6 06:25:07 CDT 2010

```Your function b(y, t) must return an array-like object.  This works:

def b(y, t):
return [0.0, 0.0]

y_0 = [1.0, 0.0]

t = linspace(0, 10, 100)

print odeint(b, y_0, t)

Date: Sun, 3 Oct 2010 19:26:25 -0400
> Subject: [SciPy-User] Problems with odeint
> To: scipy-user@scipy.org
> Message-ID:
>        <AANLkTinULOEG6h304z8QE+hgOZsM_nU6rw8y0Gu9p9vU@mail.gmail.com<AANLkTinULOEG6h304z8QE%2BhgOZsM_nU6rw8y0Gu9p9vU@mail.gmail.com>
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> I am on Mac OS X 10.5, and I am using the copy of SciPy that comes bundled
> with sage.
>
> I am having what seems like a pretty basic problem.  Entering the following
> code:
>
> def b(y, t):
>    [0.0, 0.0]
>
> y_0 = [1.0, 0.0]
>
> t = linspace(0, 10, 100)
>
> print odeint(b, y_0, t)
>
> results in a solution vector that looks like
>
> [[  1.00000000e+000   0.00000000e+000]
>  [              NaN   2.14766595e-315]
>  [              NaN   4.29533808e-315]
>  [              NaN   6.44301043e-315]
>  [              NaN   8.59068278e-315]
> <snipped>]
>
> Can other people runt this code without problems?
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mail.scipy.org/pipermail/scipy-user/attachments/20101003/5c5affcd/attachment-0001.html
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20101006/e872659b/attachment.html
```