pschoepf / naturalbreaks

Ports of fisher natural breaks optimization with O(k×n×log(n)) complexity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible NullPointerException

ddolgushin opened this issue · comments

Hello, Philipp! Thank you for your work, it's great. I've made a port of this code to C# (https://github.com/ddolgushin/stats) and noticed one bug here:

The problem is that the "breaksArray" isn't initialized but is expected to have "sortedUniqueValueCounts.length" slots. So the solution might be the preliminary initialization of this array just before the loop.

Thanks, bug has been fixed