scipy.special.poch#

scipy.special.poch(z, m, out=None) = <ufunc 'poch'>#

Pochhammer symbol.

The Pochhammer symbol (rising factorial) is defined as

\[(z)_m = \frac{\Gamma(z + m)}{\Gamma(z)}\]

For positive integer m it reads

\[(z)_m = z (z + 1) ... (z + m - 1)\]

See [dlmf] for more details.

Parameters:
z, marray_like

Real-valued arguments.

outndarray, optional

Optional output array for the function results

Returns:
scalar or ndarray

The value of the function.

Notes

poch 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 Support for the array API standard for more information.

References

[dlmf]

Nist, Digital Library of Mathematical Functions https://dlmf.nist.gov/5.2#iii

Examples

>>> import scipy.special as sc

It is 1 when m is 0.

>>> sc.poch([1, 2, 3, 4], 0)
array([1., 1., 1., 1.])

For z equal to 1 it reduces to the factorial function.

>>> sc.poch(1, 5)
120.0
>>> 1 * 2 * 3 * 4 * 5
120

It can be expressed in terms of the gamma function.

>>> z, m = 3.7, 2.1
>>> sc.poch(z, m)
20.529581933776953
>>> sc.gamma(z + m) / sc.gamma(z)
20.52958193377696