JuliaStats / Distributions.jl

A Julia package for probability distributions and associated functions.
Other
1.08k stars 410 forks source link

Fix `eachvariate` with zero variates #1819

Closed devmotion closed 6 months ago

devmotion commented 6 months ago

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 commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.