{ } Raw JSON

bundles / scipy 1.18.0 / scipy / special / _multiufuncs / sph_harm_y_all

MultiUFunc

scipy.special._multiufuncs:sph_harm_y_all

source: /scipy/special/_multiufuncs.py

Signature

def sph_harm_y_all(n, m, theta, phi, *, diff_n = 0)

Summary

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

Parameters

n : int

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

m : int

Order of the harmonics.

theta : array_like

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

phi : array_like

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

diff_n : int, 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

Aliases

  • scipy.special.sph_harm_y_all

Referenced by