def sph_harm(l, m, theta, phi): if m > 0: return np.sqrt(2) * (-1)**m * _sph_harm(m, l, phi, theta).real if m == 0: return _sph_harm(m, l, phi, theta).real else: return np.sqrt(2) * (-1)**m * _sph_harm(-m, l, phi, theta).imag
def sph_harm(l, m, theta, phi): if m > 0: return np.sqrt(2) * (-1) ** m * _sph_harm(m, l, phi, theta).real if m == 0: return _sph_harm(m, l, phi, theta).real else: return np.sqrt(2) * (-1) ** m * _sph_harm(-m, l, phi, theta).imag
def sph_harm(l, m, theta, phi): return _sph_harm(m, l, phi, theta)
def sph_harm(l, m, theta, phi): if m >= 0: return np.sqrt(2) * _sph_harm(m, l, phi, theta).real else: return np.sqrt(2) * _sph_harm(-m, l, phi, theta).imag