mincllr calibration code crashing with list index out of range
Created by: khoury
In the file python/bob/measure/calibration.py, when the p
list index of the list pos
reached the value P
(length of the pos
list), the conditional test
if n == N or neg[n] > pos[p]:
will crash as follows:
Traceback (most recent call last):
...
min_cllr = bob.measure.calibration.min_cllr(scores_dev[i][0], scores_dev[i][1])
File "/usr/lib/python2.7/site-packages/bob/measure/calibration.py", line 51, in min_cllr
if (n == N or neg[n] > pos[p]):
IndexError: list index out of range
A solution seems to be:
if not (p == P) and (n == N or neg[n] > pos[p]):