Skip to content

Commit 82d7b0e

Browse files
authored
Updated docstrings to inform users that ODE solution may be slow. (#5965)
1 parent fc66057 commit 82d7b0e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

pymc/ode/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
"""This submodule contains tools used to perform inference on ordinary differential equations."""
1+
"""
2+
This submodule contains tools used to perform inference on ordinary differential equations.
3+
4+
Due to the nature of the model (as well as included solvers), ODE solution may perform slowly.
5+
Another library based on PyMC--sunode--has implemented Adams' method and BDF (backward differentation formula) using the very fast SUNDIALS suite of ODE and PDE solvers.
6+
It is much faster than the ``pm.ode`` implementation.
7+
More information about ``sunode`` is available at: https://github.com/aseyboldt/sunode.
8+
"""
29
# Copyright 2020 The PyMC Developers
310
#
411
# Licensed under the Apache License, Version 2.0 (the "License");

pymc/ode/ode.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ class DifferentialEquation(Op):
3434
r"""
3535
Specify an ordinary differential equation
3636
37+
Due to the nature of the model (as well as included solvers), the process of ODE solution may perform slowly. A faster alternative library based on PyMC--sunode--has implemented Adams' method and BDF (backward differentation formula). More information about sunode is available at: https://github.com/aseyboldt/sunode.
38+
39+
3740
.. math::
3841
\dfrac{dy}{dt} = f(y,t,p) \quad y(t_0) = y_0
3942
@@ -64,6 +67,7 @@ def odefunc(y, t, p):
6467
times = np.arange(0.5, 5, 0.5)
6568
6669
ode_model = DifferentialEquation(func=odefunc, times=times, n_states=1, n_theta=1, t0=0)
70+
6771
"""
6872
_itypes = [
6973
TensorType(floatX, (False,)), # y0 as 1D floatX vector

0 commit comments

Comments
 (0)