scipy.special.sph_harm_y_all#

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

All spherical harmonics up to the specified degree n, order m, and all derivatives up to order diff_n.

Parameters:
nint

Degree of the harmonics. Must have n >= 0. This is often denoted by l (lower case L) in descriptions of spherical harmonics.

mint

Order of the harmonics.

thetaarray_like

Polar (colatitudinal) coordinate; must be in [0, pi].

phiarray_like

Azimuthal (longitudinal) coordinate; must be in [0, 2*pi].

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

Returns a tuple of length diff_n + 1 (if diff_n > 0). The first entry corresponds to the spherical harmonics, the second entry (if diff_n >= 1) to the gradient, and the third entry (if diff_n >= 2) to the Hessian matrix. Each entry is an array of shape (n + 1, 2 * m + 1, ...), where the entry at (i, j) corresponds to degree i and order j for all 0 <= i <= n and -m <= j <= m.

See also

sph_harm_y