Commit 633f1082 authored by Markus Holzer's avatar Markus Holzer
Browse files

Fix sympy bug

parent 5b3110c1
Pipeline #38564 failed with stages
in 6 minutes and 50 seconds
......@@ -22,10 +22,14 @@ def test_field_access_poly():
def test_field_access_piecewise():
if sp.__version__ == '1.10':
pytest.skip("Bug in SymPy 1.10")
dh = ps.create_data_handling((20, 20))
ρ = dh.add_array('rho')
pw = sp.Piecewise((0, 1 < sp.Max(-0.5, ρ.center+0.5)), (1, True))
a = sp.simplify(pw)
print(a)
try:
a = sp.Piecewise((0, 1 < sp.Max(-0.5, sp.Symbol("test") + 0.5)), (1, True))
a.simplify()
except Exception as e:
pytest.skip(f"Bug in SymPy 1.10: {e}")
else:
dh = ps.create_data_handling((20, 20))
ρ = dh.add_array('rho')
pw = sp.Piecewise((0, 1 < sp.Max(-0.5, ρ.center+0.5)), (1, True))
a = sp.simplify(pw)
print(a)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment