Skip to content

Commit 319efac

Browse files
authored
Don't use is comparisons for sympy objects (#3026)
`is` comparisons for `sympy.Symbol` or other sympy expressions are fragile and shouldn't be relied on.
1 parent 073418d commit 319efac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/sdist/amici/importers/sbml/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2714,7 +2714,7 @@ def _clean_reserved_symbols(self) -> None:
27142714
if old_symbol in symbols:
27152715
# reconstitute the whole dict in order to keep the ordering
27162716
self.symbols[symbols_ids] = {
2717-
new_symbol if k is old_symbol else k: v
2717+
new_symbol if k == old_symbol else k: v
27182718
for k, v in symbols.items()
27192719
}
27202720

0 commit comments

Comments
 (0)