Closed mmckerns closed 11 months ago
Expected behavior:
Python 3.11.5 (main, Aug 25 2023, 01:35:05) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mystic.symbolic as ms
>>> eqn = """x0 - 2*x1 > 0
... x3 - 3*x2 < 0"""
>>> print(ms.simplify(eqn))
x3 < 3*x2
x0 > 2*x1
>>> eqs = """x0 - 2*x1 == 0
... x3 - 3*x2 == 0"""
>>> print(ms.solve(eqs))
x0 = 2*x1
x2 = x3/3
>>> eqs = """x0 - 2*x1 = 0
... x3 - 3*x2 = 0"""
>>> print(ms.solve(eqs))
x0 = 2*x1
x2 = x3/3
>>>
more details...
>>> eqn = """x0 - 2*x1 = 0"""
>>> ms.solve(eqn, verbose=True, warn=True)
Warning: sympy not installed.
'x0 - 2*x1 = 0'
>>>
>>> import sympy
>>> sympy.__version__
'1.12'
>>>
it appears this is due to use of imp.find_module
, which needs to be replaced with importlib
simplify and solve should isolate a single variable on the left-hand side. It doesn't with python 3.12.0rc3.