Skip to content

Handle empty and zero-weight density sample inputs - #563

Open
BJMCox wants to merge 1 commit into
mainfrom
fix-555-empty-sample-helpers
Open

Handle empty and zero-weight density sample inputs#563
BJMCox wants to merge 1 commit into
mainfrom
fix-555-empty-sample-helpers

Conversation

@BJMCox

@BJMCox BJMCox commented Aug 16, 2026

Copy link
Copy Markdown
Member

Fixes #555.

Return empty or all-zero sample vectors unchanged before weight normalization. Empty multiplicity conversion is already handled on main.

Main code: +3/-1.

@BJMCox BJMCox self-assigned this Aug 16, 2026
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 65.44%. Comparing base (6e8795f) to head (2a4fa0c).

Files with missing lines Patch % Lines
src/variates/density_sample.jl 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #563      +/-   ##
==========================================
- Coverage   65.45%   65.44%   -0.01%     
==========================================
  Files         121      121              
  Lines        7060     7062       +2     
==========================================
+ Hits         4621     4622       +1     
- Misses       2439     2440       +1     

☔ 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.

@BJMCox
BJMCox force-pushed the fix-555-empty-sample-helpers branch 2 times, most recently from 50d33b7 to 92cce26 Compare September 1, 2026 12:06
@BJMCox
BJMCox force-pushed the fix-555-empty-sample-helpers branch from 92cce26 to 2a4fa0c Compare September 1, 2026 12:25
@BJMCox
BJMCox marked this pull request as ready for review September 1, 2026 12:34
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.

Handle empty and zero-weight density sample helpers

1 participant