Spaces:
Sleeping
Sleeping
Commit
•
2673c60
1
Parent(s):
4ed3a8f
Signal when target is not in HDI
Browse files- hdinterval.py +2 -2
hdinterval.py
CHANGED
@@ -52,7 +52,7 @@ class HDInterval:
|
|
52 |
|
53 |
def _at(self, target, tolerance, ci=1, jump=1):
|
54 |
if ci > 1:
|
55 |
-
|
56 |
|
57 |
hdi = self(ci)
|
58 |
if any(x in tolerance for x in hdi):
|
@@ -75,4 +75,4 @@ class HDInterval:
|
|
75 |
tolerance *= 10
|
76 |
warnings.warn(f'Tolerance reduced: {tolerance}')
|
77 |
|
78 |
-
raise
|
|
|
52 |
|
53 |
def _at(self, target, tolerance, ci=1, jump=1):
|
54 |
if ci > 1:
|
55 |
+
raise OverflowError()
|
56 |
|
57 |
hdi = self(ci)
|
58 |
if any(x in tolerance for x in hdi):
|
|
|
75 |
tolerance *= 10
|
76 |
warnings.warn(f'Tolerance reduced: {tolerance}')
|
77 |
|
78 |
+
raise FloatingPointError('Unable to converge')
|