Fix incorrect wrapped docstring of jax.scipy.special.gamma

Fixes the docstring `jax.scipy.special.gamma`, which was wrapping `scipy.special.gammaln` by mistake. Also adds a note that the function currently only accepts real inputs.
This commit is contained in:
Nicolas Tessore 2023-06-01 20:13:37 +01:00
parent 5c2070c204
commit a835cafdad
No known key found for this signature in database
GPG Key ID: 6110AD9819080235

View File

@ -42,7 +42,8 @@ def gammaln(x: ArrayLike) -> Array:
return lax.lgamma(x)
@_wraps(osp_special.gammaln, module='scipy.special')
@_wraps(osp_special.gamma, module='scipy.special', lax_description="""\
The JAX version only accepts real-valued inputs.""")
def gamma(x: ArrayLike) -> Array:
x, = promote_args_inexact("gamma", x)
return lax.exp(lax.lgamma(x))