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

fix: Consistently round half-way points down in dt.round #18245

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

MarcoGorelli
Copy link
Collaborator

closes #18239

@MarcoGorelli MarcoGorelli changed the title fix: consistently round down in dt.round fix: Consistently round down in dt.round Aug 17, 2024
@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars and removed title needs formatting labels Aug 17, 2024
@MarcoGorelli MarcoGorelli marked this pull request as ready for review August 18, 2024 09:55
@MarcoGorelli MarcoGorelli changed the title fix: Consistently round down in dt.round fix: Consistently round half-way points down in dt.round Aug 18, 2024
Copy link

codecov bot commented Aug 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.24%. Comparing base (7654387) to head (ab883e5).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18245      +/-   ##
==========================================
- Coverage   80.30%   80.24%   -0.06%     
==========================================
  Files        1499     1500       +1     
  Lines      198744   198889     +145     
  Branches     2837     2837              
==========================================
+ Hits       159604   159606       +2     
- Misses      38613    38756     +143     
  Partials      527      527              

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

@@ -5,6 +5,11 @@ use polars_core::prelude::*;
use polars_utils::cache::FastFixedCache;

use crate::prelude::*;
use crate::truncate::fast_truncate;

fn fast_round(t: i64, every: i64) -> i64 {
Copy link
Member

Choose a reason for hiding this comment

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

can you tag this with inline(always)?

@ritchie46 ritchie46 merged commit 86519ae into pola-rs:main Aug 19, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dt.round() slow/fast path use different rounding
2 participants