Gmousse / dataframe-js

No Maintenance Intended
https://gmousse.gitbooks.io/dataframe-js/
MIT License
460 stars 38 forks source link

max() over a column of all-negative values returns zero #46

Closed jonathanrhodes closed 6 years ago

jonathanrhodes commented 6 years ago
> dataFrame = new DataFrame.DataFrame([[-1], [-2], [-3]], ['value']);
> dataFrame.stat.max('value');
0
> dataFrame.stat.min('value');
-3

It appears that max() is initialized to 0, so it will never return a negative value: https://github.com/Gmousse/dataframe-js/blob/master/src/modules/stat.js#L36-L40.

Gmousse commented 6 years ago

Hey @jonathanrhodes .

Sorry for this newby bug, I fix it quickly.

Gmousse commented 6 years ago

@jonathanrhodes Closed and resolved in 1.2.8 (and in next 1.3.0)

jonathanrhodes commented 6 years ago

Thanks for the quick fix!

Jonathan Rhodes https://www.linkedin.com/in/jonathanmrhodes | VP of Engineering metricstory.com https://www.metricstory.com/ | @Metricstory https://twitter.com/MetricStory

On Sun, Apr 8, 2018 at 6:33 AM, Guillaume Mousnier <notifications@github.com

wrote:

@jonathanrhodes https://github.com/jonathanrhodes Closed and resolved in 1.2.8 (and in next 1.3.0)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Gmousse/dataframe-js/issues/46#issuecomment-379551024, or mute the thread https://github.com/notifications/unsubscribe-auth/AWKxYUGhK4qcG-ok_xcn8DHlS1G4BLC8ks5tmhHHgaJpZM4TH1mw .