Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pytensor/scalar/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -1357,13 +1357,13 @@ def c_code(self, *args, **kwargs):


def betainc_grad(p, q, x, wrtp: bool):
"""Gradient of the regularized lower gamma function (P) wrt to the first
argument (k, a.k.a. alpha).

Adapted from STAN `grad_reg_lower_inc_gamma.hpp`
"""
Gradient of the regularized incomplete beta function wrt to the first
argument `p` (aka alpha) or the second argument `q` (aka beta),
depending on whether `wrtp` is true.

Reference: Gautschi, W. (1979). A computational procedure for incomplete gamma functions.
ACM Transactions on Mathematical Software (TOMS), 5(4), 466-481.
Reference: Boik, R. J., & Robison-Cox, J. F. (1998). Derivatives of the incomplete beta function.
Journal of Statistical Software, 3(1), 1-20.
"""

def _betainc_der(p, q, x, wrtp, skip_loop):
Expand Down