-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
BUG: nonmonotonicity in betaincinv, btdtri, stats.beta.ppf #12796
Labels
defect
A clear bug or issue that prevents SciPy from being installed or used as expected
scipy.special
Milestone
Comments
josef-pkt
added
defect
A clear bug or issue that prevents SciPy from being installed or used as expected
scipy.special
labels
Aug 31, 2020
For information to anyone who wants to solve (or work around) this issue: the implementation of Boost seems to be correct: https://www.boost.org/doc/libs/1_58_0/libs/math/doc/html/math_toolkit/sf_beta/ibeta_inv_function.html. |
@mckib2 Boostinator : ) |
mckib2
added a commit
to mckib2/scipy
that referenced
this issue
Dec 20, 2020
mckib2
added a commit
to mckib2/scipy
that referenced
this issue
Jan 2, 2021
WarrenWeckesser
added a commit
to WarrenWeckesser/scipy
that referenced
this issue
Jan 2, 2023
* Use boost's ibeta as the backend for special.betainc * Use boost's ibeta_inv as the backend for special.betaincinv * Add special.betaincc and special.betainccinv as wrappers of boost's ibetac and ibetac_inv, resp. * Make special.btdtr and special.btdtri aliases of special.betainc and special.betaincinv, resp. * Assorted tests added. Closes scipygh-12796.
WarrenWeckesser
added a commit
to WarrenWeckesser/scipy
that referenced
this issue
Jan 2, 2023
* Use boost's ibeta as the backend for special.betainc * Use boost's ibeta_inv as the backend for special.betaincinv * Add special.betaincc and special.betainccinv as wrappers of boost's ibetac and ibetac_inv, resp. * Make special.btdtr and special.btdtri aliases of special.betainc and special.betaincinv, resp. * Add new tests. * Move all tests of betainc, betaincinv, betaincc and betainccinv into a separate class. * Move all tests of beta and betaln into a separate class. Closes scipygh-12796.
WarrenWeckesser
added a commit
to WarrenWeckesser/scipy
that referenced
this issue
Jan 2, 2023
* Use boost's ibeta as the backend for special.betainc * Use boost's ibeta_inv as the backend for special.betaincinv * Add special.betaincc and special.betainccinv as wrappers of boost's ibetac and ibetac_inv, resp. * Make special.btdtr and special.btdtri aliases of special.betainc and special.betaincinv, resp. * Add new tests. * Move all tests of betainc, betaincinv, betaincc and betainccinv into a separate class. * Move all tests of beta and betaln into a separate class. Closes scipygh-12796.
WarrenWeckesser
added a commit
to WarrenWeckesser/scipy
that referenced
this issue
Jan 2, 2023
* Use boost's ibeta as the backend for special.betainc * Use boost's ibeta_inv as the backend for special.betaincinv * Add special.betaincc and special.betainccinv as wrappers of boost's ibetac and ibetac_inv, resp. * Make special.btdtr and special.btdtri aliases of special.betainc and special.betaincinv, resp. * Add new tests. * Move all tests of betainc, betaincinv, betaincc and betainccinv into a separate class. * Move all tests of beta and betaln into a separate class. Closes scipygh-12796.
steppi
pushed a commit
that referenced
this issue
Aug 31, 2023
* ENH: special: Improvements for the incomplete beta functions. * Use boost's ibeta as the backend for special.betainc * Use boost's ibeta_inv as the backend for special.betaincinv * Add special.betaincc and special.betainccinv as wrappers of boost's ibetac and ibetac_inv, resp. * Make special.btdtr and special.btdtri aliases of special.betainc and special.betaincinv, resp. * Add new tests. * Move all tests of betainc, betaincinv, betaincc and betainccinv into a separate class. * Move all tests of beta and betaln into a separate class. Closes gh-12796. * TST: special: Loosen a couple tolerances. * MAINT: special: Fix the following issue reported by the linter: scipy/special/_add_newdocs.py:11:10: UP006 [*] Use `dict` instead of `Dict` for type annotations * Add regression test for the boost issue (currenty fails) * Override a couple Boost policies; update a test. * fix whitespace * fix a comment * Slightly looser tolerance for a hyp1f1 test * Reformat code in comment. Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com> * Restore cephes-based btdtr and btdri, and deprecate them. * Tweak docstrings of betainc and betaincinv. * DOC: Add Sphinx 'deprecated' directive in btdtr and btdtri docstrings. * DOC: add scipy.stats.beta to 'See Also' for betainc and betaincc. * Add a utility to modify deprecated ufunc docstrings, and use it for btdtr and btdtri. * DOC: Explain what 'deprecate_ufunc()' does in more detail. * TST (temporary): Define a local variable in a failing test, so it will show up in the error log. * Filter deprecation warnings only for the deprecated functions. * * Use custom deprecation wrappers instead of the deprecate_ufunc utility. * In the btdtr and btdtri docstrings, move the `deprecated` directive from the notes to just before the paramers. * Tell mypy to ignore some checks. * Undo a couple trivial changes that ended up being committed. * Update SciPy version for deprecation of btdtr and btdtri * Use pytest.deprecated_call() context when testing deprecated functions. * Two updates: * Add recommended alternative to the deprecation messages of btdtr and btdtri. * In special/__init__.py, change name depr_msg to _depr_msg. --------- Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
defect
A clear bug or issue that prevents SciPy from being installed or used as expected
scipy.special
betaincinv and related function have a nonmonotonicity which looks incorrect
statsmodels issue statsmodels/statsmodels#7008 is for
scipy.stats.beta.isf
but that uses btdri which is equivalent to betaincinv
The text was updated successfully, but these errors were encountered: