Skip to main content
`Ctrl`+`K`

# scipy.special.sph_legendre_p

scipy.special.sph_legendre_p(n, m, theta, *, diff_n=0) = <scipy.special._multiufuncs.MultiUFunc object>

  Spherical Legendre polynomial of the first kind.

  Parameters:
    n ArrayLike[int]

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

    m ArrayLike[int]

      Order of the spherical Legendre polynomial.

    theta ArrayLike[float]

      Input value.

    diff_n Optional[int]

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

  Returns:
    p ndarray or tuple[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\).