mthh / jenkspy

Compute Natural Breaks in Python (Fisher-Jenks algorithm)

Home Page:https://pypi.python.org/pypi/jenkspy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check Overflow -> Segfault|Incorrect

orbisvicis opened this issue · comments

Can lead to a segfault:

>>> jenkspy.jenks_breaks([-14838, -126, -21471, 68, -113958128770812511394573913949783646572, 11252, 5757, 18665, 363470513890101146, -3621371149760118654], 8)
Segmentation fault (core dumped)

Or can lead to an incorrect result by silently dropping values without raising an error:

>>> jenkspy.jenks_breaks([1, 2, 3, float("inf")], 2)
<stderr warning>
[1.0, 2.0, 3.0]