[SciPy-User] typo in odeint docstring
Tony S Yu
tsyu80 at gmail.com
Thu Feb 25 14:26:29 EST 2010
I think the shape of the solutions returned by scipy.integrate.odeint is incorrectly documented: the number of rows matches the number of time steps (in the docstring, N_rows = len(y0))
Example:
>>> from scipy import integrate
>>> import numpy as np
>>>
>>> x0 = np.ones(5)
>>> dxdt = lambda x, t: x + 1
>>> times = np.linspace(0, 1, 10)
>>> print integrate.odeint(dxdt, x0, times).shape
(10, 5)
Cheers,
-Tony
PS: I know there's some sort of doc editor for scipy. Should I be making the change there instead of emailing the list?
Patch:
Index: scipy/integrate/odepack.py
===================================================================
--- scipy/integrate/odepack.py (revision 6250)
+++ scipy/integrate/odepack.py (working copy)
@@ -57,7 +57,7 @@
Returns
-------
- y : array, shape (len(y0), len(t))
+ y : array, shape (len(t), len(y0))
Array containing the value of y for each desired time in t,
with the initial value y0 in the first row.
More information about the SciPy-User
mailing list