Updates for the incomplete beta functions in scipy.special
Hey all, In the pull request https://github.com/scipy/scipy/pull/17697, I propose the following changes for functions in `scipy.special` that are related to the incomplete beta function: * Use boost's `ibeta` as the backend for `special.betainc` and boost's `ibeta_inv` as the backend for `special.betaincinv`. This replaces the Cephes-based backend for these functions. * Add `special.betaincc` and `special.betainccinv` as wrappers of boost's `ibetac` and `ibetac_inv`, resp. These are the "complementary" versions of the functions. * Make the existing names `special.btdtr` and `special.btdtri` aliases of `special.betainc` and `special.betaincinv`, resp. The names for the new functions `betaincc` and `betainccinv` follow the pattern of the names of the existing incomplete gamma functions. That is, the names betainc, betaincinv, betaincc and betainccinv are analogous to the existing names gammainc, gammaincinv, gammaincc and gammainccinv. Because this introduces the new functions `betaincc` and `betainccinv`, it is more than a basic maintenance change, so feedback from the mailing list would be appreciated. Warren
On Thu, May 11, 2023 at 12:12 AM Warren Weckesser < warren.weckesser@gmail.com> wrote:
Hey all,
In the pull request https://github.com/scipy/scipy/pull/17697, I propose the following changes for functions in `scipy.special` that are related to the incomplete beta function:
* Use boost's `ibeta` as the backend for `special.betainc` and boost's `ibeta_inv` as the backend for `special.betaincinv`. This replaces the Cephes-based backend for these functions. * Add `special.betaincc` and `special.betainccinv` as wrappers of boost's `ibetac` and `ibetac_inv`, resp. These are the "complementary" versions of the functions. * Make the existing names `special.btdtr` and `special.btdtri` aliases of `special.betainc` and `special.betaincinv`, resp.
The names for the new functions `betaincc` and `betainccinv` follow the pattern of the names of the existing incomplete gamma functions. That is, the names betainc, betaincinv, betaincc and betainccinv are analogous to the existing names gammainc, gammaincinv, gammaincc and gammainccinv.
Because this introduces the new functions `betaincc` and `betainccinv`, it is more than a basic maintenance change, so feedback from the mailing list would be appreciated.
Thanks Warren. The new names are nicer, and your PR looks great. So +1 from me. Cheers, Ralf
On 5/10/23, Ralf Gommers <ralf.gommers@gmail.com> wrote:
On Thu, May 11, 2023 at 12:12 AM Warren Weckesser < warren.weckesser@gmail.com> wrote:
Hey all,
In the pull request https://github.com/scipy/scipy/pull/17697, I propose the following changes for functions in `scipy.special` that are related to the incomplete beta function:
* Use boost's `ibeta` as the backend for `special.betainc` and boost's `ibeta_inv` as the backend for `special.betaincinv`. This replaces the Cephes-based backend for these functions. * Add `special.betaincc` and `special.betainccinv` as wrappers of boost's `ibetac` and `ibetac_inv`, resp. These are the "complementary" versions of the functions. * Make the existing names `special.btdtr` and `special.btdtri` aliases of `special.betainc` and `special.betaincinv`, resp.
The names for the new functions `betaincc` and `betainccinv` follow the pattern of the names of the existing incomplete gamma functions. That is, the names betainc, betaincinv, betaincc and betainccinv are analogous to the existing names gammainc, gammaincinv, gammaincc and gammainccinv.
Because this introduces the new functions `betaincc` and `betainccinv`, it is more than a basic maintenance change, so feedback from the mailing list would be appreciated.
Thanks Warren. The new names are nicer, and your PR looks great. So +1 from me.
Cheers, Ralf
An update on the proposed change in https://github.com/scipy/scipy/pull/17697: instead of making `btdtr` and `btdtri` aliases of `betainc` and `betaincinv` (with the idea that `btdtr` and `btdtri` would eventually be deprecated), now `btdtr` and `btdtri` are deprecated in the pull request. According to https://scipy.github.io/devdocs/dev/core-dev/index.html#deprecations, deprecations should be brought up on the mailing list. Although it might have been implied in the original email and in the first version of the PR that *eventually* `btdtr` and `btdtri` would be deprecated, now they *are* deprecated in the PR, so this follow-up email is to let everyone know about it. Warren
participants (2)
-
Ralf Gommers -
Warren Weckesser