Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make is-zero-checks compatible to the upcoming sympy>1.12 (#2350)
Current sympy master (tested: 0ededfcfc033ddca2d1d54a0eda85bf53c63761c): ```python IPython console for SymPy 1.13.dev (Python 3.12.2-64-bit) (ground types: python) In [1]: Float(0) == 0 Out[1]: False In [2]: Float(0).is_zero Out[2]: True ``` vs 1.12: ```python Python console for SymPy 1.12 (Python 3.12.2-64-bit) (ground types: python) >>> Float(0) == 0 True >>> Float(0).is_zero True ``` Therefore, replace `== 0` by `.is_zero`. Amongst other potential issues, this fixes zeros in sparse matrices. Closes #2320.
- Loading branch information