Source code for ggf.sci_funcs

"""Other scientific functions"""
import numpy as np

from .matlab_funcs import legendre


[docs]def legendrePlm(m, l, x): # noqa: E741 a = np.concatenate((np.atleast_1d(np.zeros(m)), np.atleast_1d(np.array(1)), np.atleast_1d(np.zeros(l - m)))) b = legendre(l, x) return np.real_if_close(np.dot(a, b)[0])