scipy.special.sph_legendre_p#

scipy.special.sph_legendre_p(n, m, theta, \*, diff_n=0) = <scipy.special._multiufuncs.MultiUFunc object>[source]#

Spherical Legendre polynomial of the first kind.

Parameters:
narray_like of ints

Degree of the spherical Legendre polynomial. Must have n >= 0.

marray_like of ints

Order of the spherical Legendre polynomial.

thetaarray_like

Input value.

diff_nint, optional

A non-negative integer. Compute and return all derivatives up to order diff_n. Default is 0.

Returns:
ndarray or tuple of ndarray

Spherical Legendre polynomial with diff_n derivatives.

Notes

The spherical counterpart of an (unnormalized) associated Legendre polynomial has the additional factor

\[\sqrt{\frac{(2 n + 1) (n - m)!}{4 \pi (n + m)!}}\]

It is the same as the spherical harmonic \(Y_{n}^{m}(\theta, \phi)\) with \(\phi = 0\).

Array API Standard Support

sph_legendre_p has support for Python Array API Standard compatible backends in addition to NumPy. The following combinations of backend and device (or other capability) are supported.

Library

CPU

GPU

NumPy

✅

n/a

CuPy

n/a

⛔

PyTorch

✅

⛔

JAX

⚠️ no JIT

⛔

Dask

⛔

n/a

See Array API coverage for more information.