Skip to content

making_acro_hist_similar_to_R_hist - #71

Open
mahaalbashir wants to merge 1 commit into
mainfrom
68-new-feature-request-making-the-acro-histogram-similar-to-the-r-histogram
Open

making_acro_hist_similar_to_R_hist#71
mahaalbashir wants to merge 1 commit into
mainfrom
68-new-feature-request-making-the-acro-histogram-similar-to-the-r-histogram

Conversation

@mahaalbashir

Copy link
Copy Markdown
Collaborator

This PR updates the ACRO R hist() function to align with Base R's histogram binning and counts behaviour.

Note

Base R's hist() and Python's histogram functions handle interval boundaries differently. R hist() uses right-closed intervals. So if a data point lands on a boundary bin edge, R puts it in the lower bin, while pandas hist() will put it in the upper bin.

Solution:

  1. The exact bin edges are computed in Base R and passed to pandas/NumPy.
  2. A small offset (1e-7) is added to the upper bounds of each bin to match R's binning behaviour.

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0cb6954) to head (f3cbd2f).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #71   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          274       281    +7     
=========================================
+ Hits           274       281    +7     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mahaalbashir
mahaalbashir requested a review from jim-smith August 7, 2026 14:26
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.

[New Feature Request] Making the acro histogram similar to the R histogram

1 participant