Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change aggregate stats type and added unique method. #603

Merged
merged 3 commits into from
Oct 20, 2024
Merged

Conversation

nwlandry
Copy link
Collaborator

@nwlandry nwlandry commented Oct 19, 2024

This PR does the following:

  • Makes the type of the statistic aggregate methods (max, min, etc.) the classic float type instead of the new numpy type.
  • added the unique method to the statistics interface.

This was linked to issues Oct 19, 2024
Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.24%. Comparing base (1fa9839) to head (3e59dc4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #603      +/-   ##
==========================================
+ Coverage   93.21%   93.24%   +0.02%     
==========================================
  Files          62       62              
  Lines        4733     4735       +2     
==========================================
+ Hits         4412     4415       +3     
+ Misses        321      320       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nwlandry nwlandry changed the title added the unique() method to stats Change aggregate stats type Oct 20, 2024
@nwlandry nwlandry changed the title Change aggregate stats type Change aggregate stats type and added unique method. Oct 20, 2024
@nwlandry nwlandry requested a review from leotrs October 20, 2024 16:41
Copy link
Collaborator

@leotrs leotrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a little context? What is this new numpy float type? What versions is it available in? Do we want to pin the numpy version?

@nwlandry
Copy link
Collaborator Author

Could you add a little context? What is this new numpy float type? What versions is it available in? Do we want to pin the numpy version?

@leotrs --- thanks for the review! Numpy 2.0 created breaking changes, which resulted in Issues #544 and #566. Numpy made the decision to use their own float and int datatypes (np.int32, np.int64, etc.) (not sure why), and we made the decision that the traditional Python types are preferable.

@nwlandry
Copy link
Collaborator Author

The way we are handling the Numpy interface now is largely backwards-compatible, so we will also be able to use Numpy versions <2.0.

@nwlandry nwlandry merged commit 139a2bc into main Oct 20, 2024
24 checks passed
@nwlandry nwlandry deleted the unique-stats branch October 20, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a unique method to stats mixed types in the stats package
2 participants