diff --git a/odetoolbox/singularity_detection.py b/odetoolbox/singularity_detection.py index 98013bdb..40e06655 100644 --- a/odetoolbox/singularity_detection.py +++ b/odetoolbox/singularity_detection.py @@ -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)