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

error in two-dimensional arrays

lwq-star opened this issue · comments

When I run the function using a two-dimensional array(size are (902, 1219)),
I received an error:
IndexError: index 902 is out of bounds for axis 0 with size 902
Does this function not support such two-dimensional arrays?

if np and isinstance(values, np.ndarray): values = values[np.argwhere(np.isfinite(values)).reshape(-1)]
The error is here.

Thanks for the report.

Jenkspy doesn't support two-dimensional arrays. It should probably be checked at the same time as the other checks are performed (null values, data types, etc.).
I will work on it.

It has been fixed by 8f40a58 and should now return an error saying that A 1D array is expected.