Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 4ddf10c

Browse files
author
Benjamin Hackl
committed
catch NoConvergence error in test_relation
1 parent 190a7be commit 4ddf10c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sage/symbolic/expression.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2703,6 +2703,7 @@ cdef class Expression(CommutativeRingElement):
27032703
else:
27042704
return not equality_ok
27052705
else:
2706+
from mpmath.libmp.libhyper import NoConvergence
27062707
for k in range(ntests):
27072708
try:
27082709
if is_interval:
@@ -2718,7 +2719,8 @@ cdef class Expression(CommutativeRingElement):
27182719
return False
27192720
if is_interval:
27202721
eq_count += <bint>val.contains_zero()
2721-
except (TypeError, ValueError, ArithmeticError, AttributeError) as ex:
2722+
except (TypeError, ValueError, ArithmeticError,
2723+
AttributeError, NoConvergence) as ex:
27222724
errors += 1
27232725
if k == errors > 3 and is_ComplexIntervalField(domain):
27242726
domain = RIF.to_prec(domain.prec())

0 commit comments

Comments
 (0)