Skip to content

Commit 5e9f349

Browse files
michaelosthegetwiecki
authored andcommitted
Repair ode API after refactor broke it (#3684)
* add DtypeError with informative error message * use float64 in augment system because of scipy * set dtypes explicitly in all places * fix incorrect sensitivity matrix column order closes #3676 + order of sensitivity columns now beginning with y0 + tests were aligned + order of y0, theta now everywhere * more detailed docstrings * re-run after the fix * update & re-run after the fix
1 parent 2b7f302 commit 5e9f349

File tree

6 files changed

+496
-293
lines changed

6 files changed

+496
-293
lines changed

docs/source/notebooks/ODE_API_introduction.ipynb

Lines changed: 157 additions & 21 deletions
Large diffs are not rendered by default.

docs/source/notebooks/ODE_API_shapes_and_benchmarking.ipynb

Lines changed: 70 additions & 34 deletions
Large diffs are not rendered by default.

pymc3/exceptions.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,13 @@ def __init__(self, message, actual=None, expected=None):
3333
if expected and actual:
3434
super().__init__('{} (actual {} != expected {})'.format(message, actual, expected))
3535
else:
36-
super().__init__(message)
36+
super().__init__(message)
37+
38+
39+
class DtypeError(TypeError):
40+
"""Error that the dtype of a variable is incorrect."""
41+
def __init__(self, message, actual=None, expected=None):
42+
if expected and actual:
43+
super().__init__('{} (actual {} != expected {})'.format(message, actual, expected))
44+
else:
45+
super().__init__(message)

0 commit comments

Comments
 (0)