Skip to content
Snippets Groups Projects
Commit a9ffbd70 authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

make Sympy version detection 2.0-ready

parent cdefa7e1
No related branches found
No related tags found
1 merge request!239Sympy 1.9 support
Pipeline #31736 passed
...@@ -583,7 +583,7 @@ def get_type_of_expression(expr, ...@@ -583,7 +583,7 @@ def get_type_of_expression(expr,
sympy_version = sp.__version__.split('.') sympy_version = sp.__version__.split('.')
if int(sympy_version[0]) <= 1 and int(sympy_version[1]) >= 9: if int(sympy_version[0]) * 100 + int(sympy_version[1]) >= 109:
# __setstate__ would bypass the contructor, so we remove it # __setstate__ would bypass the contructor, so we remove it
sp.Number.__getstate__ = sp.Basic.__getstate__ sp.Number.__getstate__ = sp.Basic.__getstate__
del sp.Basic.__getstate__ del sp.Basic.__getstate__
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment