case where threshold is greater than all scores
@@ -105,6 +105,7 @@ class ScoreRecords(object) :
scores = self.classifier.predict_proba(distances)[:,-1]
mask = scores > self.threshold
+ if mask.any():
scored_pairs = numpy.empty(numpy.count_nonzero(mask),
dtype=[('pairs', 'object', 2),
