bundles / scipy 1.17.1 / scipy / special / _basic / polygamma
function
scipy.special._basic:polygamma
source: /scipy/special/_basic.py :1539
Signature
def polygamma ( n , x ) Summary
Polygamma functions.
Extended Summary
Defined as where is the digamma function. See [dlmf] for details.
Parameters
n: array_likeThe order of the derivative of the digamma function; must be integral
x: array_likeReal valued input
Returns
: ndarrayFunction results
Notes
Array API Standard Support
polygamma has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable SCIPY_ARRAY_API=1 and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.
==================== ==================== ==================== Library CPU GPU ==================== ==================== ==================== NumPy ✅ n/a CuPy n/a ✅ PyTorch ✅ ✅ JAX ✅ ✅ Dask ✅ n/a ==================== ==================== ====================
See
dev-arrayapifor more information.
Examples
from scipy import special x = [2, 3, 25.5]✓
special.polygamma(1, x) special.polygamma(0, x) == special.psi(x)✗
See also
- digamma
Aliases
-
scipy.special.polygamma