Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions odetoolbox/singularity_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ def _is_matrix_defined_under_substitution(A: sympy.Matrix, cond_set: Set[Symmetr
a set with equations, where the left-hand side of each equation is the variable that is to be subsituted, and the right-hand side is the expression to put in its place
"""
for val in sympy.flatten(A):
if isinstance(val, float) or isinstance(val, int) or isinstance(val, sympy.core.numbers.Number):
continue

expr_sub = val.copy()
for eq in cond_set:
expr_sub = expr_sub.subs(eq.lhs, eq.rhs)
Expand Down