Skip to content

Extract drop_singleton_values() helper in mcmc_nuts_treedepth()#512

Merged
jgabry merged 1 commit intostan-dev:masterfrom
utkarshpawade:refactor/nuts-diagnostic-dry
Mar 26, 2026
Merged

Extract drop_singleton_values() helper in mcmc_nuts_treedepth()#512
jgabry merged 1 commit intostan-dev:masterfrom
utkarshpawade:refactor/nuts-diagnostic-dry

Conversation

@utkarshpawade
Copy link
Contributor

Fixes #511

Summary

  • Extract drop_singleton_values(df, col) internal helper to deduplicate the "keep values with count > 1" filtering logic
  • Replace both instances in mcmc_nuts_treedepth() with calls to the helper

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.67%. Comparing base (b19e3cd) to head (1f53b21).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #512      +/-   ##
==========================================
- Coverage   98.67%   98.67%   -0.01%     
==========================================
  Files          35       35              
  Lines        5904     5903       -1     
==========================================
- Hits         5826     5825       -1     
  Misses         78       78              

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

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

Thanks!

@jgabry jgabry merged commit 617650b into stan-dev:master Mar 26, 2026
6 checks passed
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.

Duplicated filtering logic in mcmc_nuts_treedepth()

3 participants