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 eachvariate with zero variates #1819

Merged
merged 1 commit into from
Jan 5, 2024
Merged

Conversation

devmotion
Copy link
Member

Currently, the constructor of Distributions.EachVariate fails when there are zero variates (along at least one dimension). The PR fixes this problem similar to the approach taken for Slices in https://github.com/JuliaLang/julia/blob/38b81562d79dfa44816bd3ce5b249cad87904587/base/slicearray.jl#L43C1-L43C1.

Fixes #1817.

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9e72f1f) 85.93% compared to head (230351b) 85.95%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1819      +/-   ##
==========================================
+ Coverage   85.93%   85.95%   +0.01%     
==========================================
  Files         144      144              
  Lines        8655     8655              
==========================================
+ Hits         7438     7439       +1     
+ Misses       1217     1216       -1     

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

@devmotion devmotion merged commit 28bf738 into master Jan 5, 2024
12 of 15 checks passed
@devmotion devmotion deleted the dw/eachvariate_empty branch January 5, 2024 10:46
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.

rand(::Sampleable{Multivariate}, 0) errors
3 participants