SciPy

scipy.special.lpmv

scipy.special.lpmv(x1, x2, x3[, out]) = <ufunc 'lpmv'>

y=lpmv(m,v,x) returns the associated legendre function of integer order m and real degree v (s.t. v>-m-1 or v<m): |x| <= 1.