You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
First of all, congratulations and thanks for your work.
Using the function for calculate the mode, I've found that when the mode is a low value compared with the rest, and the data array is relatively long, an incorrect result occurs:
Hi,
First of all, congratulations and thanks for your work.
Using the function for calculate the mode, I've found that when the mode is a low value compared with the rest, and the data array is relatively long, an incorrect result occurs:
Example:
As we can see the result is incorrect, because the function should return [4]
After analyze the results and study the function code, I've located the problem and this is the fix:
File: https://github.com/montanaflynn/stats/blob/master/mode.go
I don't know if the solution convinces you, but it works. If you see it well, I can make the changes and emit a pull request to correct it sooner.
The text was updated successfully, but these errors were encountered: