We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Documentation should discourage odeint
odeint is not the recommended way to solve an IVP, but that's not mentioned in the documentation. I am not suggesting that odeint be removed, but we should discourage users from using it.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `scipy/integrate/odepack.py`
Content:
```
1 # Author: Travis Oliphant
2 from __future__ import division, print_function, absolute_import
3 
4 __all__ = ['odeint']
5 
6 from . import _odepack
7 from copy import copy
8 import warnings
9 
10 class ODEintWarning(Warning):
11     pass
12 
13 _msgs = {2: "Integration successful.",
14          1: "Nothing was done; the integration time was 0.",
15          -1: "Excess work done on this call (perhaps wrong Dfun type).",
16          -2: "Excess accuracy requested (tolerances too small).",
17          -3: "Illegal input detected (internal error).",
18          -4: "Repeated error test failures (internal error).",
19          -5: "Repeated convergence failures (perhaps bad Jacobian or tolerances).",
20          -6: "Error weight became zero during problem.",
21          -7: "Internal workspace insufficient to finish (internal error)."
22          }
23 
24 
25 def odeint(func, y0, t, args=(), Dfun=None, col_deriv=0, full_output=0,
26            ml=None, mu=None, rtol=None, atol=None, tcrit=None, h0=0.0,
27            hmax=0.0, hmin=0.0, ixpr=0, mxstep=0, mxhnil=0, mxordn=12,
28            mxords=5, printmessg=0):
29     """
30     Integrate a system of ordinary differential equations.
31 
32     Solve a system of ordinary differential equations using lsoda from the
33     FORTRAN library odepack.
34 
35     Solves the initial value problem for stiff or non-stiff systems
36     of first order ode-s::
37 
38         dy/dt = func(y, t, ...)
39 
40     where y can be a vector.
41 
42     *Note*: The first two arguments of ``func(y, t, ...)`` are in the
43     opposite order of the arguments in the system definition function used
44     by the `scipy.integrate.ode` class.
45 
46     Parameters
47     ----------
48     func : callable(y, t, ...)
49         Computes the derivative of y at t.
50     y0 : array
51         Initial condition on y (can be a vector).
52     t : array
53         A sequence of time points for which to solve for y.  The initial
54         value point should be the first element of this sequence.
55     args : tuple, optional
56         Extra arguments to pass to function.
57     Dfun : callable(y, t, ...)
58         Gradient (Jacobian) of `func`.
59     col_deriv : bool, optional
60         True if `Dfun` defines derivatives down columns (faster),
61         otherwise `Dfun` should define derivatives across rows.
62     full_output : bool, optional
63         True if to return a dictionary of optional outputs as the second output
64     printmessg : bool, optional
65         Whether to print the convergence message
66 
67     Returns
68     -------
69     y : array, shape (len(t), len(y0))
70         Array containing the value of y for each desired time in t,
71         with the initial value `y0` in the first row.
72     infodict : dict, only returned if full_output == True
73         Dictionary containing additional output information
74 
75         =======  ============================================================
76         key      meaning
77         =======  ============================================================
78         'hu'     vector of step sizes successfully used for each time step.
79         'tcur'   vector with the value of t reached for each time step.
80                  (will always be at least as large as the input times).
81         'tolsf'  vector of tolerance scale factors, greater than 1.0,
82                  computed when a request for too much accuracy was detected.
83         'tsw'    value of t at the time of the last method switch
84                  (given for each time step)
85         'nst'    cumulative number of time steps
86         'nfe'    cumulative number of function evaluations for each time step
87         'nje'    cumulative number of jacobian evaluations for each time step
88         'nqu'    a vector of method orders for each successful step.
89         'imxer'  index of the component of largest magnitude in the
90                  weighted local error vector (e / ewt) on an error return, -1
91                  otherwise.
92         'lenrw'  the length of the double work array required.
93         'leniw'  the length of integer work array required.
94         'mused'  a vector of method indicators for each successful time step:
95                  1: adams (nonstiff), 2: bdf (stiff)
96         =======  ============================================================
97 
98     Other Parameters
99     ----------------
100     ml, mu : int, optional
101         If either of these are not None or non-negative, then the
102         Jacobian is assumed to be banded.  These give the number of
103         lower and upper non-zero diagonals in this banded matrix.
104         For the banded case, `Dfun` should return a matrix whose
105         rows contain the non-zero bands (starting with the lowest diagonal).
106         Thus, the return matrix `jac` from `Dfun` should have shape
107         ``(ml + mu + 1, len(y0))`` when ``ml >=0`` or ``mu >=0``.
108         The data in `jac` must be stored such that ``jac[i - j + mu, j]``
109         holds the derivative of the `i`th equation with respect to the `j`th
110         state variable.  If `col_deriv` is True, the transpose of this
111         `jac` must be returned.
112     rtol, atol : float, optional
113         The input parameters `rtol` and `atol` determine the error
114         control performed by the solver.  The solver will control the
115         vector, e, of estimated local errors in y, according to an
116         inequality of the form ``max-norm of (e / ewt) <= 1``,
117         where ewt is a vector of positive error weights computed as
118         ``ewt = rtol * abs(y) + atol``.
119         rtol and atol can be either vectors the same length as y or scalars.
120         Defaults to 1.49012e-8.
121     tcrit : ndarray, optional
122         Vector of critical points (e.g. singularities) where integration
123         care should be taken.
124     h0 : float, (0: solver-determined), optional
125         The step size to be attempted on the first step.
126     hmax : float, (0: solver-determined), optional
127         The maximum absolute step size allowed.
128     hmin : float, (0: solver-determined), optional
129         The minimum absolute step size allowed.
130     ixpr : bool, optional
131         Whether to generate extra printing at method switches.
132     mxstep : int, (0: solver-determined), optional
133         Maximum number of (internally defined) steps allowed for each
134         integration point in t.
135     mxhnil : int, (0: solver-determined), optional
136         Maximum number of messages printed.
137     mxordn : int, (0: solver-determined), optional
138         Maximum order to be allowed for the non-stiff (Adams) method.
139     mxords : int, (0: solver-determined), optional
140         Maximum order to be allowed for the stiff (BDF) method.
141 
142     See Also
143     --------
144     ode : a more object-oriented integrator based on VODE.
145     quad : for finding the area under a curve.
146 
147     Examples
148     --------
149     The second order differential equation for the angle `theta` of a
150     pendulum acted on by gravity with friction can be written::
151 
152         theta''(t) + b*theta'(t) + c*sin(theta(t)) = 0
153 
154     where `b` and `c` are positive constants, and a prime (') denotes a
155     derivative.  To solve this equation with `odeint`, we must first convert
156     it to a system of first order equations.  By defining the angular
157     velocity ``omega(t) = theta'(t)``, we obtain the system::
158 
159         theta'(t) = omega(t)
160         omega'(t) = -b*omega(t) - c*sin(theta(t))
161 
162     Let `y` be the vector [`theta`, `omega`].  We implement this system
163     in python as:
164 
165     >>> def pend(y, t, b, c):
166     ...     theta, omega = y
167     ...     dydt = [omega, -b*omega - c*np.sin(theta)]
168     ...     return dydt
169     ...
170     
171     We assume the constants are `b` = 0.25 and `c` = 5.0:
172 
173     >>> b = 0.25
174     >>> c = 5.0
175 
176     For initial conditions, we assume the pendulum is nearly vertical
177     with `theta(0)` = `pi` - 0.1, and it initially at rest, so
178     `omega(0)` = 0.  Then the vector of initial conditions is
179 
180     >>> y0 = [np.pi - 0.1, 0.0]
181 
182     We generate a solution 101 evenly spaced samples in the interval
183     0 <= `t` <= 10.  So our array of times is:
184 
185     >>> t = np.linspace(0, 10, 101)
186 
187     Call `odeint` to generate the solution.  To pass the parameters
188     `b` and `c` to `pend`, we give them to `odeint` using the `args`
189     argument.
190 
191     >>> from scipy.integrate import odeint
192     >>> sol = odeint(pend, y0, t, args=(b, c))
193 
194     The solution is an array with shape (101, 2).  The first column
195     is `theta(t)`, and the second is `omega(t)`.  The following code
196     plots both components.
197 
198     >>> import matplotlib.pyplot as plt
199     >>> plt.plot(t, sol[:, 0], 'b', label='theta(t)')
200     >>> plt.plot(t, sol[:, 1], 'g', label='omega(t)')
201     >>> plt.legend(loc='best')
202     >>> plt.xlabel('t')
203     >>> plt.grid()
204     >>> plt.show()
205     """
206 
207     if ml is None:
208         ml = -1  # changed to zero inside function call
209     if mu is None:
210         mu = -1  # changed to zero inside function call
211     t = copy(t)
212     y0 = copy(y0)
213     output = _odepack.odeint(func, y0, t, args, Dfun, col_deriv, ml, mu,
214                              full_output, rtol, atol, tcrit, h0, hmax, hmin,
215                              ixpr, mxstep, mxhnil, mxordn, mxords)
216     if output[-1] < 0:
217         warning_msg = _msgs[output[-1]] + " Run with full_output = 1 to get quantitative information."
218         warnings.warn(warning_msg, ODEintWarning)
219     elif printmessg:
220         warning_msg = _msgs[output[-1]]
221         warnings.warn(warning_msg, ODEintWarning)
222 
223     if full_output:
224         output[1]['message'] = _msgs[output[-1]]
225 
226     output = output[:-1]
227     if len(output) == 1:
228         return output[0]
229     else:
230         return output
231
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/scipy/integrate/odepack.py b/scipy/integrate/odepack.py
--- a/scipy/integrate/odepack.py
+++ b/scipy/integrate/odepack.py
@@ -28,6 +28,9 @@
            mxords=5, printmessg=0):
     """
     Integrate a system of ordinary differential equations.
+    
+    .. note:: For new code, use `scipy.integrate.solve_ivp` to solve a
+              differential equation.
 
     Solve a system of ordinary differential equations using lsoda from the
     FORTRAN library odepack.
@@ -39,9 +42,9 @@
 
     where y can be a vector.
 
-    *Note*: The first two arguments of ``func(y, t, ...)`` are in the
-    opposite order of the arguments in the system definition function used
-    by the `scipy.integrate.ode` class.
+    .. note:: The first two arguments of ``func(y, t, ...)`` are in the
+              opposite order of the arguments in the system definition
+              function used by the `scipy.integrate.ode` class.
 
     Parameters
     ----------

{"golden_diff": "diff --git a/scipy/integrate/odepack.py b/scipy/integrate/odepack.py\n--- a/scipy/integrate/odepack.py\n+++ b/scipy/integrate/odepack.py\n@@ -28,6 +28,9 @@\n            mxords=5, printmessg=0):\n     \"\"\"\n     Integrate a system of ordinary differential equations.\n+    \n+    .. note:: For new code, use `scipy.integrate.solve_ivp` to solve a\n+              differential equation.\n \n     Solve a system of ordinary differential equations using lsoda from the\n     FORTRAN library odepack.\n@@ -39,9 +42,9 @@\n \n     where y can be a vector.\n \n-    *Note*: The first two arguments of ``func(y, t, ...)`` are in the\n-    opposite order of the arguments in the system definition function used\n-    by the `scipy.integrate.ode` class.\n+    .. note:: The first two arguments of ``func(y, t, ...)`` are in the\n+              opposite order of the arguments in the system definition\n+              function used by the `scipy.integrate.ode` class.\n \n     Parameters\n     ----------\n", "issue": "Documentation should discourage odeint\nodeint is not the recommended way to solve an IVP, but that's not mentioned in the documentation. I am not suggesting that odeint be removed, but we should discourage users from using it.\n", "before_files": [{"content": "# Author: Travis Oliphant\nfrom __future__ import division, print_function, absolute_import\n\n__all__ = ['odeint']\n\nfrom . import _odepack\nfrom copy import copy\nimport warnings\n\nclass ODEintWarning(Warning):\n    pass\n\n_msgs = {2: \"Integration successful.\",\n         1: \"Nothing was done; the integration time was 0.\",\n         -1: \"Excess work done on this call (perhaps wrong Dfun type).\",\n         -2: \"Excess accuracy requested (tolerances too small).\",\n         -3: \"Illegal input detected (internal error).\",\n         -4: \"Repeated error test failures (internal error).\",\n         -5: \"Repeated convergence failures (perhaps bad Jacobian or tolerances).\",\n         -6: \"Error weight became zero during problem.\",\n         -7: \"Internal workspace insufficient to finish (internal error).\"\n         }\n\n\ndef odeint(func, y0, t, args=(), Dfun=None, col_deriv=0, full_output=0,\n           ml=None, mu=None, rtol=None, atol=None, tcrit=None, h0=0.0,\n           hmax=0.0, hmin=0.0, ixpr=0, mxstep=0, mxhnil=0, mxordn=12,\n           mxords=5, printmessg=0):\n    \"\"\"\n    Integrate a system of ordinary differential equations.\n\n    Solve a system of ordinary differential equations using lsoda from the\n    FORTRAN library odepack.\n\n    Solves the initial value problem for stiff or non-stiff systems\n    of first order ode-s::\n\n        dy/dt = func(y, t, ...)\n\n    where y can be a vector.\n\n    *Note*: The first two arguments of ``func(y, t, ...)`` are in the\n    opposite order of the arguments in the system definition function used\n    by the `scipy.integrate.ode` class.\n\n    Parameters\n    ----------\n    func : callable(y, t, ...)\n        Computes the derivative of y at t.\n    y0 : array\n        Initial condition on y (can be a vector).\n    t : array\n        A sequence of time points for which to solve for y.  The initial\n        value point should be the first element of this sequence.\n    args : tuple, optional\n        Extra arguments to pass to function.\n    Dfun : callable(y, t, ...)\n        Gradient (Jacobian) of `func`.\n    col_deriv : bool, optional\n        True if `Dfun` defines derivatives down columns (faster),\n        otherwise `Dfun` should define derivatives across rows.\n    full_output : bool, optional\n        True if to return a dictionary of optional outputs as the second output\n    printmessg : bool, optional\n        Whether to print the convergence message\n\n    Returns\n    -------\n    y : array, shape (len(t), len(y0))\n        Array containing the value of y for each desired time in t,\n        with the initial value `y0` in the first row.\n    infodict : dict, only returned if full_output == True\n        Dictionary containing additional output information\n\n        =======  ============================================================\n        key      meaning\n        =======  ============================================================\n        'hu'     vector of step sizes successfully used for each time step.\n        'tcur'   vector with the value of t reached for each time step.\n                 (will always be at least as large as the input times).\n        'tolsf'  vector of tolerance scale factors, greater than 1.0,\n                 computed when a request for too much accuracy was detected.\n        'tsw'    value of t at the time of the last method switch\n                 (given for each time step)\n        'nst'    cumulative number of time steps\n        'nfe'    cumulative number of function evaluations for each time step\n        'nje'    cumulative number of jacobian evaluations for each time step\n        'nqu'    a vector of method orders for each successful step.\n        'imxer'  index of the component of largest magnitude in the\n                 weighted local error vector (e / ewt) on an error return, -1\n                 otherwise.\n        'lenrw'  the length of the double work array required.\n        'leniw'  the length of integer work array required.\n        'mused'  a vector of method indicators for each successful time step:\n                 1: adams (nonstiff), 2: bdf (stiff)\n        =======  ============================================================\n\n    Other Parameters\n    ----------------\n    ml, mu : int, optional\n        If either of these are not None or non-negative, then the\n        Jacobian is assumed to be banded.  These give the number of\n        lower and upper non-zero diagonals in this banded matrix.\n        For the banded case, `Dfun` should return a matrix whose\n        rows contain the non-zero bands (starting with the lowest diagonal).\n        Thus, the return matrix `jac` from `Dfun` should have shape\n        ``(ml + mu + 1, len(y0))`` when ``ml >=0`` or ``mu >=0``.\n        The data in `jac` must be stored such that ``jac[i - j + mu, j]``\n        holds the derivative of the `i`th equation with respect to the `j`th\n        state variable.  If `col_deriv` is True, the transpose of this\n        `jac` must be returned.\n    rtol, atol : float, optional\n        The input parameters `rtol` and `atol` determine the error\n        control performed by the solver.  The solver will control the\n        vector, e, of estimated local errors in y, according to an\n        inequality of the form ``max-norm of (e / ewt) <= 1``,\n        where ewt is a vector of positive error weights computed as\n        ``ewt = rtol * abs(y) + atol``.\n        rtol and atol can be either vectors the same length as y or scalars.\n        Defaults to 1.49012e-8.\n    tcrit : ndarray, optional\n        Vector of critical points (e.g. singularities) where integration\n        care should be taken.\n    h0 : float, (0: solver-determined), optional\n        The step size to be attempted on the first step.\n    hmax : float, (0: solver-determined), optional\n        The maximum absolute step size allowed.\n    hmin : float, (0: solver-determined), optional\n        The minimum absolute step size allowed.\n    ixpr : bool, optional\n        Whether to generate extra printing at method switches.\n    mxstep : int, (0: solver-determined), optional\n        Maximum number of (internally defined) steps allowed for each\n        integration point in t.\n    mxhnil : int, (0: solver-determined), optional\n        Maximum number of messages printed.\n    mxordn : int, (0: solver-determined), optional\n        Maximum order to be allowed for the non-stiff (Adams) method.\n    mxords : int, (0: solver-determined), optional\n        Maximum order to be allowed for the stiff (BDF) method.\n\n    See Also\n    --------\n    ode : a more object-oriented integrator based on VODE.\n    quad : for finding the area under a curve.\n\n    Examples\n    --------\n    The second order differential equation for the angle `theta` of a\n    pendulum acted on by gravity with friction can be written::\n\n        theta''(t) + b*theta'(t) + c*sin(theta(t)) = 0\n\n    where `b` and `c` are positive constants, and a prime (') denotes a\n    derivative.  To solve this equation with `odeint`, we must first convert\n    it to a system of first order equations.  By defining the angular\n    velocity ``omega(t) = theta'(t)``, we obtain the system::\n\n        theta'(t) = omega(t)\n        omega'(t) = -b*omega(t) - c*sin(theta(t))\n\n    Let `y` be the vector [`theta`, `omega`].  We implement this system\n    in python as:\n\n    >>> def pend(y, t, b, c):\n    ...     theta, omega = y\n    ...     dydt = [omega, -b*omega - c*np.sin(theta)]\n    ...     return dydt\n    ...\n    \n    We assume the constants are `b` = 0.25 and `c` = 5.0:\n\n    >>> b = 0.25\n    >>> c = 5.0\n\n    For initial conditions, we assume the pendulum is nearly vertical\n    with `theta(0)` = `pi` - 0.1, and it initially at rest, so\n    `omega(0)` = 0.  Then the vector of initial conditions is\n\n    >>> y0 = [np.pi - 0.1, 0.0]\n\n    We generate a solution 101 evenly spaced samples in the interval\n    0 <= `t` <= 10.  So our array of times is:\n\n    >>> t = np.linspace(0, 10, 101)\n\n    Call `odeint` to generate the solution.  To pass the parameters\n    `b` and `c` to `pend`, we give them to `odeint` using the `args`\n    argument.\n\n    >>> from scipy.integrate import odeint\n    >>> sol = odeint(pend, y0, t, args=(b, c))\n\n    The solution is an array with shape (101, 2).  The first column\n    is `theta(t)`, and the second is `omega(t)`.  The following code\n    plots both components.\n\n    >>> import matplotlib.pyplot as plt\n    >>> plt.plot(t, sol[:, 0], 'b', label='theta(t)')\n    >>> plt.plot(t, sol[:, 1], 'g', label='omega(t)')\n    >>> plt.legend(loc='best')\n    >>> plt.xlabel('t')\n    >>> plt.grid()\n    >>> plt.show()\n    \"\"\"\n\n    if ml is None:\n        ml = -1  # changed to zero inside function call\n    if mu is None:\n        mu = -1  # changed to zero inside function call\n    t = copy(t)\n    y0 = copy(y0)\n    output = _odepack.odeint(func, y0, t, args, Dfun, col_deriv, ml, mu,\n                             full_output, rtol, atol, tcrit, h0, hmax, hmin,\n                             ixpr, mxstep, mxhnil, mxordn, mxords)\n    if output[-1] < 0:\n        warning_msg = _msgs[output[-1]] + \" Run with full_output = 1 to get quantitative information.\"\n        warnings.warn(warning_msg, ODEintWarning)\n    elif printmessg:\n        warning_msg = _msgs[output[-1]]\n        warnings.warn(warning_msg, ODEintWarning)\n\n    if full_output:\n        output[1]['message'] = _msgs[output[-1]]\n\n    output = output[:-1]\n    if len(output) == 1:\n        return output[0]\n    else:\n        return output\n", "path": "scipy/integrate/odepack.py"}], "after_files": [{"content": "# Author: Travis Oliphant\nfrom __future__ import division, print_function, absolute_import\n\n__all__ = ['odeint']\n\nfrom . import _odepack\nfrom copy import copy\nimport warnings\n\nclass ODEintWarning(Warning):\n    pass\n\n_msgs = {2: \"Integration successful.\",\n         1: \"Nothing was done; the integration time was 0.\",\n         -1: \"Excess work done on this call (perhaps wrong Dfun type).\",\n         -2: \"Excess accuracy requested (tolerances too small).\",\n         -3: \"Illegal input detected (internal error).\",\n         -4: \"Repeated error test failures (internal error).\",\n         -5: \"Repeated convergence failures (perhaps bad Jacobian or tolerances).\",\n         -6: \"Error weight became zero during problem.\",\n         -7: \"Internal workspace insufficient to finish (internal error).\"\n         }\n\n\ndef odeint(func, y0, t, args=(), Dfun=None, col_deriv=0, full_output=0,\n           ml=None, mu=None, rtol=None, atol=None, tcrit=None, h0=0.0,\n           hmax=0.0, hmin=0.0, ixpr=0, mxstep=0, mxhnil=0, mxordn=12,\n           mxords=5, printmessg=0):\n    \"\"\"\n    Integrate a system of ordinary differential equations.\n    \n    .. note:: For new code, use `scipy.integrate.solve_ivp` to solve a\n              differential equation.\n\n    Solve a system of ordinary differential equations using lsoda from the\n    FORTRAN library odepack.\n\n    Solves the initial value problem for stiff or non-stiff systems\n    of first order ode-s::\n\n        dy/dt = func(y, t, ...)\n\n    where y can be a vector.\n\n    .. note:: The first two arguments of ``func(y, t, ...)`` are in the\n              opposite order of the arguments in the system definition\n              function used by the `scipy.integrate.ode` class.\n\n    Parameters\n    ----------\n    func : callable(y, t, ...)\n        Computes the derivative of y at t.\n    y0 : array\n        Initial condition on y (can be a vector).\n    t : array\n        A sequence of time points for which to solve for y.  The initial\n        value point should be the first element of this sequence.\n    args : tuple, optional\n        Extra arguments to pass to function.\n    Dfun : callable(y, t, ...)\n        Gradient (Jacobian) of `func`.\n    col_deriv : bool, optional\n        True if `Dfun` defines derivatives down columns (faster),\n        otherwise `Dfun` should define derivatives across rows.\n    full_output : bool, optional\n        True if to return a dictionary of optional outputs as the second output\n    printmessg : bool, optional\n        Whether to print the convergence message\n\n    Returns\n    -------\n    y : array, shape (len(t), len(y0))\n        Array containing the value of y for each desired time in t,\n        with the initial value `y0` in the first row.\n    infodict : dict, only returned if full_output == True\n        Dictionary containing additional output information\n\n        =======  ============================================================\n        key      meaning\n        =======  ============================================================\n        'hu'     vector of step sizes successfully used for each time step.\n        'tcur'   vector with the value of t reached for each time step.\n                 (will always be at least as large as the input times).\n        'tolsf'  vector of tolerance scale factors, greater than 1.0,\n                 computed when a request for too much accuracy was detected.\n        'tsw'    value of t at the time of the last method switch\n                 (given for each time step)\n        'nst'    cumulative number of time steps\n        'nfe'    cumulative number of function evaluations for each time step\n        'nje'    cumulative number of jacobian evaluations for each time step\n        'nqu'    a vector of method orders for each successful step.\n        'imxer'  index of the component of largest magnitude in the\n                 weighted local error vector (e / ewt) on an error return, -1\n                 otherwise.\n        'lenrw'  the length of the double work array required.\n        'leniw'  the length of integer work array required.\n        'mused'  a vector of method indicators for each successful time step:\n                 1: adams (nonstiff), 2: bdf (stiff)\n        =======  ============================================================\n\n    Other Parameters\n    ----------------\n    ml, mu : int, optional\n        If either of these are not None or non-negative, then the\n        Jacobian is assumed to be banded.  These give the number of\n        lower and upper non-zero diagonals in this banded matrix.\n        For the banded case, `Dfun` should return a matrix whose\n        rows contain the non-zero bands (starting with the lowest diagonal).\n        Thus, the return matrix `jac` from `Dfun` should have shape\n        ``(ml + mu + 1, len(y0))`` when ``ml >=0`` or ``mu >=0``.\n        The data in `jac` must be stored such that ``jac[i - j + mu, j]``\n        holds the derivative of the `i`th equation with respect to the `j`th\n        state variable.  If `col_deriv` is True, the transpose of this\n        `jac` must be returned.\n    rtol, atol : float, optional\n        The input parameters `rtol` and `atol` determine the error\n        control performed by the solver.  The solver will control the\n        vector, e, of estimated local errors in y, according to an\n        inequality of the form ``max-norm of (e / ewt) <= 1``,\n        where ewt is a vector of positive error weights computed as\n        ``ewt = rtol * abs(y) + atol``.\n        rtol and atol can be either vectors the same length as y or scalars.\n        Defaults to 1.49012e-8.\n    tcrit : ndarray, optional\n        Vector of critical points (e.g. singularities) where integration\n        care should be taken.\n    h0 : float, (0: solver-determined), optional\n        The step size to be attempted on the first step.\n    hmax : float, (0: solver-determined), optional\n        The maximum absolute step size allowed.\n    hmin : float, (0: solver-determined), optional\n        The minimum absolute step size allowed.\n    ixpr : bool, optional\n        Whether to generate extra printing at method switches.\n    mxstep : int, (0: solver-determined), optional\n        Maximum number of (internally defined) steps allowed for each\n        integration point in t.\n    mxhnil : int, (0: solver-determined), optional\n        Maximum number of messages printed.\n    mxordn : int, (0: solver-determined), optional\n        Maximum order to be allowed for the non-stiff (Adams) method.\n    mxords : int, (0: solver-determined), optional\n        Maximum order to be allowed for the stiff (BDF) method.\n\n    See Also\n    --------\n    ode : a more object-oriented integrator based on VODE.\n    quad : for finding the area under a curve.\n\n    Examples\n    --------\n    The second order differential equation for the angle `theta` of a\n    pendulum acted on by gravity with friction can be written::\n\n        theta''(t) + b*theta'(t) + c*sin(theta(t)) = 0\n\n    where `b` and `c` are positive constants, and a prime (') denotes a\n    derivative.  To solve this equation with `odeint`, we must first convert\n    it to a system of first order equations.  By defining the angular\n    velocity ``omega(t) = theta'(t)``, we obtain the system::\n\n        theta'(t) = omega(t)\n        omega'(t) = -b*omega(t) - c*sin(theta(t))\n\n    Let `y` be the vector [`theta`, `omega`].  We implement this system\n    in python as:\n\n    >>> def pend(y, t, b, c):\n    ...     theta, omega = y\n    ...     dydt = [omega, -b*omega - c*np.sin(theta)]\n    ...     return dydt\n    ...\n    \n    We assume the constants are `b` = 0.25 and `c` = 5.0:\n\n    >>> b = 0.25\n    >>> c = 5.0\n\n    For initial conditions, we assume the pendulum is nearly vertical\n    with `theta(0)` = `pi` - 0.1, and it initially at rest, so\n    `omega(0)` = 0.  Then the vector of initial conditions is\n\n    >>> y0 = [np.pi - 0.1, 0.0]\n\n    We generate a solution 101 evenly spaced samples in the interval\n    0 <= `t` <= 10.  So our array of times is:\n\n    >>> t = np.linspace(0, 10, 101)\n\n    Call `odeint` to generate the solution.  To pass the parameters\n    `b` and `c` to `pend`, we give them to `odeint` using the `args`\n    argument.\n\n    >>> from scipy.integrate import odeint\n    >>> sol = odeint(pend, y0, t, args=(b, c))\n\n    The solution is an array with shape (101, 2).  The first column\n    is `theta(t)`, and the second is `omega(t)`.  The following code\n    plots both components.\n\n    >>> import matplotlib.pyplot as plt\n    >>> plt.plot(t, sol[:, 0], 'b', label='theta(t)')\n    >>> plt.plot(t, sol[:, 1], 'g', label='omega(t)')\n    >>> plt.legend(loc='best')\n    >>> plt.xlabel('t')\n    >>> plt.grid()\n    >>> plt.show()\n    \"\"\"\n\n    if ml is None:\n        ml = -1  # changed to zero inside function call\n    if mu is None:\n        mu = -1  # changed to zero inside function call\n    t = copy(t)\n    y0 = copy(y0)\n    output = _odepack.odeint(func, y0, t, args, Dfun, col_deriv, ml, mu,\n                             full_output, rtol, atol, tcrit, h0, hmax, hmin,\n                             ixpr, mxstep, mxhnil, mxordn, mxords)\n    if output[-1] < 0:\n        warning_msg = _msgs[output[-1]] + \" Run with full_output = 1 to get quantitative information.\"\n        warnings.warn(warning_msg, ODEintWarning)\n    elif printmessg:\n        warning_msg = _msgs[output[-1]]\n        warnings.warn(warning_msg, ODEintWarning)\n\n    if full_output:\n        output[1]['message'] = _msgs[output[-1]]\n\n    output = output[:-1]\n    if len(output) == 1:\n        return output[0]\n    else:\n        return output\n", "path": "scipy/integrate/odepack.py"}]}