jerome-white commited on
Commit
2673c60
1 Parent(s): 4ed3a8f

Signal when target is not in HDI

Browse files
Files changed (1) hide show
  1. 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
- return 1
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 OverflowError('Unable to converge')
 
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')