Skip to content

Commit e7bc832

Browse files
michaelosthegetwiecki
authored andcommitted
add type annotations in docstring
1 parent 7d9a7ab commit e7bc832

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

pymc3/ode/ode.py

+8-10
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ class DifferentialEquation(theano.Op):
3434
Parameters
3535
----------
3636
37-
func: callable
37+
func : callable
3838
Function specifying the differential equation. Must take arguments y (n_states,), t (scalar), p (n_theta,)
39-
times: array
39+
times : array
4040
Array of times at which to evaluate the solution of the differential equation.
41-
n_states: int
41+
n_states : int
4242
Dimension of the differential equation. For scalar differential equations, n_states=1.
4343
For vector valued differential equations, n_states = number of differential equations in the system.
44-
n_theta: int
44+
n_theta : int
4545
Number of parameters in the differential equation.
46-
t0: float
46+
t0 : float
4747
Time corresponding to the initial condition
4848
4949
Examples
@@ -95,18 +95,16 @@ def __init__(self, func, times, *, n_states, n_theta, t0=0):
9595
self._apply_nodes = {}
9696
self._output_sensitivities = {}
9797

98-
# FIXME: what are the types of these arguments? Couldn't guess when I was reformatting the
99-
# docstring. [2020/04/11:rpg]
10098
def _system(self, Y, t, p):
10199
r"""This is the function that will be passed to odeint. Solves both ODE and sensitivities.
102100
103101
Parameters
104102
----------
105-
Y :
103+
Y : array
106104
augmented state vector (n_states + n_states + n_theta)
107-
t :
105+
t : float
108106
current time
109-
p :
107+
p : array
110108
parameter vector (y0, theta)
111109
"""
112110
dydt, ddt_dydp = self._augmented_func(Y[:self.n_states], t, p, Y[self.n_states:])

0 commit comments

Comments
 (0)