Open devmotion opened 10 months ago
Attention: Patch coverage is 94.85294%
with 7 lines
in your changes missing coverage. Please review.
Project coverage is 86.29%. Comparing base (
a1010e4
) to head (8345f1c
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Currently, the return type of
quantile
etc. is inconsistent, in particular for discrete distributions. For many distributions (and in particular those for which we fall back to StatsFuns/Rmath) the return type is explicitly to converted toInt
to match the type of the variates. However, the behaviour of some distributions such asGeometric
orBernoulli
is inconsistent: The return type ofquantile
does not match the type of the variates.This PR fixes the inconsistency. Moreover, I added tests to avoid regressions and made an existing test a bit stricter. These tests revealed a few additional problems (e.g. caused by the Rmath behaviour that
StatsFuns.RFunctions.binominvcdf(10, 1.0, 0.0) = 0
andStatsFuns.RFunctions.hyperinvlogccdf(2, 2, 2, -Inf) = NaN
which so far we have hidden by skipping them in the tests).Fixes #1798.