henrikbostrom/crepes

`higher_percentiles` & `lower_percentiles` of type `numpy.float64` are not recognized as float

Closed this issue · 1 comments

If I submit values for higher_percentile or lower_percentile from a numpy array, these values are not seen as float (as they are indeed numpy.float64) -- hence they are never transformed into the 1-valued list (see line 361 in base.py).

A working solution could be to replace each line of the kind

if type(lower_percentiles) in [int, float]:

with:

if isinstance(lower_percentiles, (int, float)):

which would return True for both float and numpy.float64 types.

Hi,

Thanks for pointing this out; I have included a similar fix in the new release (0.2.0):

if isinstance(lower_percentiles, (int, float, np.integer, np.floating)):

(and similar for higher_percentiles)