Skip to content

Commit e401d52

Browse files
fixing appredict error (#240)
* fixing appredict error
1 parent 2c4f4bb commit e401d52

File tree

49 files changed

+4568
-6525
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4568
-6525
lines changed

RELEASE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Release 0.9.8
1+
# Release 0.9.9
22
- Fixed an issue with unused variables appearing in common terms in jacobians.
3-
- Fixes a bug printing large integers, in some environments: Large numbers such as 8.034023767017109e+27 whch were actually ints would be printed as an the int 8034023767017108950029959168 and then the C++ compiler would complain as that's more than the maximum int value. This has been fixed by only printing ints as ints if they are `MIN_INT < number < MAX_INT` else we print them as a float (and we get the sceintific notation).
4-
- Fixed tests to pass with sympy 1.10 and required latest cellmlmanip, which also workes with sympy1.10. Updated sympy requirement to be >=1.9, < 1.11
3+
- Fixes a bug printing large integers, in some environments: Large numbers such as 8.034023767017109e+27 which were actually ints would be printed as an the int 8034023767017108950029959168 and then the C++ compiler would complain as that's more than the maximum int value. This has been fixed by only printing ints as ints if they are `MIN_INT < number < MAX_INT` else we print them as a float (and we get the sceintific notation).
4+
- Fixed tests to pass with sympy 1.10 and required latest cellmlmanip, which also works with sympy1.10. Updated sympy requirement to be >=1.9, < 1.11
55

66
# Release 0.9.5
77
- Corrected a type in the generated output for `--rush-larsen-c`

chaste_codegen/_partial_eval.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55
Float,
66
Piecewise,
77
cse,
8-
exp,
98
piecewise_fold,
109
)
1110
from sympy.core import Symbol
1211

13-
from chaste_codegen._math_functions import exp_
14-
1512

1613
def get_usage_count(equations):
1714
"""Counts the amount of times the lhs for each eq is used on the rhs in the set of equations following it.
@@ -36,12 +33,10 @@ def fold_piecewises(expr):
3633
# Since piecewise_fold hangs with some complicated nestings, due to simplification we use the following workaround:
3734
# First extract common terms, perform piecewise_fold, re-insert the common terms
3835
# see: https://github.com/sympy/sympy/issues/20850
39-
expr = expr.replace(exp, exp_)
4036
common_terms, expr = cse(expr)
4137
expr = piecewise_fold(expr[0])
4238
for term, ex in reversed(common_terms):
4339
expr = expr.xreplace({term: ex})
44-
expr = expr.replace(exp_, exp)
4540
return expr
4641

4742

chaste_codegen/data/tests/chaste_reference_models/BE/aslanidi_atrial_model_2009.cpp

Lines changed: 67 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chaste_codegen/data/tests/chaste_reference_models/BE/aslanidi_atrial_model_2009.cpp_alt

Lines changed: 67 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chaste_codegen/data/tests/chaste_reference_models/BE/li_mouse_2010.cpp

Lines changed: 140 additions & 136 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chaste_codegen/data/tests/chaste_reference_models/BE/li_mouse_2010.cpp_alt

Lines changed: 145 additions & 141 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chaste_codegen/data/tests/chaste_reference_models/BEopt/bondarenko_szigeti_bett_kim_rasmusson_2004_apical.cpp

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chaste_codegen/data/tests/chaste_reference_models/BEopt/bondarenko_szigeti_bett_kim_rasmusson_2004_apical.cpp_alt

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)