mooflow.utils.class_by_bisect

mooflow.utils.class_by_bisect(value, ranges, direction='left')

bisect an list for a value and return the position

Parameters
valueint or float

value to look-up

rangeslist

look-up list needs to be sorted

Returns
positionint

the right side position