Skip to content

Commit 7d0c964

Browse files
committed
Use have_mpfr in place of HAVE_SYMENGINE_MPFR
1 parent a22e394 commit 7d0c964

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

symengine/sympy_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __new__(cls, num, dps=None, precision=None):
5959
if precision is None:
6060
precision = dps_to_prec(dps)
6161

62-
IF HAVE_SYMENGINE_MPFR:
62+
if symengine.have_mpfr:
6363
if precision > 53:
6464
if isinstance(num, symengine.RealMPFR) and precision == num.get_prec():
6565
return num

symengine/tests/test_sympy_compat.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from symengine.sympy_compat import (Integer, Rational, S, Basic, Add, Mul,
22
Pow, symbols, Symbol, log, sin, sech, csch, zeros, atan2, Number, Float,
33
symengine)
4+
from symengine.utilities import raises
45

56

67
def test_Integer():
@@ -38,7 +39,7 @@ def test_Float():
3839
assert isinstance(C, symengine.RealDouble)
3940
raises(ValueError, lambda: Float("1.23", dps = 3, precision = 10))
4041
raises(ValueError, lambda: Float(A, dps = 3, precision = 16))
41-
if HAVE_SYMENGINE_MPFR:
42+
if symengine.have_mpfr:
4243
A = Float("1.23", dps = 16)
4344
B = Float("1.23", precision = 56)
4445
assert A == B
@@ -54,7 +55,7 @@ def test_Float():
5455
assert A == C
5556
assert isinstance(A, Float)
5657
assert isinstance(A, symengine.RealDouble)
57-
if not HAVE_SYMENGINE_MPFR:
58+
if not symengine.have_mpfr:
5859
raises(ValueError, lambda: Float("1.23", precision = 58))
5960

6061

0 commit comments

Comments
 (0)