mthh / jenkspy

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

The return type of `jenks_breaks` #26

Closed Zeroto521 closed 2 years ago

Zeroto521 commented 2 years ago

The return type of jenks_breaks is a tuple. But it's a list actually. The doc or return type should be updated.

https://github.com/mthh/jenkspy/blob/a4ee57ebd06e74ab4fa6c5ed3577abc7165d4331/jenkspy/core.py#L79-L93

>>> from jenkspy import jenks_breaks
>>> jenks_breaks([1.3, 7.1, 7.3, 2.3, 3.9, 4.1, 7.8, 1.2, 4.3, 7.3, 5.0, 4.3], 3)
[1.2, 2.3, 5.0, 7.8]
mthh commented 2 years ago

Thanks ! I fixed the docstring and released version 0.2.2.