Skip to content

Update to StatsFuns@2 - #2062

Merged
andreasnoack merged 3 commits into
masterfrom
dmw/statsfuns2
Jun 3, 2026
Merged

andreasnoack merged 3 commits into
masterfrom
dmw/statsfuns2

Conversation

@devmotion

Copy link
Copy Markdown
Member

No description provided.

The new `nbinomlogpdf` in StatsFuns@2 is not ForwardDiff-safe at the
`p = 1, k = 0` boundary (the `0 <= p <= 1` guard misfires for
`Dual(1.0, +ε)` under ForwardDiff's lex-ordered `<=`, and the all-Dual
frule for `xlog1py(0, -1)` produces a NaN partial). The pre-existing
hand-written `logpdf` block already handled this correctly, so keep it
and only delegate `cdf`/`quantile`/etc. via explicit one-liners as
before.

Also bump the `StatsFuns` compat to `2.0.1`, which carries the upstream
fix for `srdistcdf` (#211 in StatsFuns) that the `StudentizedRange` and
`Truncated{StudentizedRange}` tests depend on.
Comment thread Project.toml
Statistics = "1"
StatsAPI = "1.6"
StatsBase = "0.32, 0.33, 0.34"
StatsFuns = "1.5.2"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it necessary to drop support for 1? It doesn't look like it required any code changes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not anymore, it did in the initial version - but these additional changes would require even more fixes on the StatsFuns side, so I postponed them.

Comment thread Project.toml Outdated
@codecov-commenter

codecov-commenter commented Jun 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.65%. Comparing base (a7ed7b6) to head (7567e26).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2062   +/-   ##
=======================================
  Coverage   86.65%   86.65%           
=======================================
  Files         148      148           
  Lines        8919     8919           
=======================================
  Hits         7729     7729           
  Misses       1190     1190           

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

@andreasnoack
andreasnoack merged commit 7e30854 into master Jun 3, 2026
15 checks passed
@andreasnoack
andreasnoack deleted the dmw/statsfuns2 branch June 3, 2026 15:01
@devmotion

Copy link
Copy Markdown
Member Author

The PR should not have been merged. It requires JuliaStats/StatsFuns.jl#211. Or, more precisely, without it the version bound is pretty useless.

@andreasnoack

Copy link
Copy Markdown
Member

The PR should not have been merged.

I don't think that was clear from the description. Wasn't it marked as ready?

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.

3 participants