bob.sp.Quantization has weird border handling
Created by: tiagofrepereira2012
Copying the issue from here (https://github.com/idiap/bob/issues/184)
##################### By chance, I had a look at the bob.sp.Quantization class. It seems that this class has several issues, especially in border cases:
- the call function returns 0 in two cases: when the element is in the first range, or when the element is below the lowest threshold
- the call function returns the highest index in two cases: when the element is in the last range, or when the element is above the highest threshold
In fact, point (2) cannot even be distinguished in the C++ implementation of the function since the highest threshold in not even stored in the range of thresholds. Usually, when there are 4 ranges, it requires 5 thresholds, but this class holds only 4.