mthh / jenkspy

Compute Natural Breaks in Python (Fisher-Jenks algorithm)
https://pypi.python.org/pypi/jenkspy
MIT License
217 stars 28 forks source link

JenksNaturalBreaks(1) fails #28

Closed pulquero closed 1 year ago

pulquero commented 1 year ago

group() doesn't handle the edge case of n_classes=1 as innerbreaks is empty: groups_ = [arr[arr <= self.innerbreaks[0]]]

mthh commented 1 year ago

Thanks for reporting it. I will fix it soon (probably tomorrow, but don't hesitate if you prefer to submit a pull request yourself in the meantime).

mthh commented 1 year ago

This has been fixed in 85c80e3.