BUG: special: ensure analyticity of associated Legendre function of first kind gh-2396 discusses the problem of phase factors in the Legendre function for complex arguments. In fact, the Legendre function of the first kind as it is implemented, exhibits phase jumps on the unit circle and thus is not analytic. These commits introduce a new function clpmn which provides an analytic associated Legendre function of the first kind. The existing function lpmn in the new version raises an exception if used for complex arguments. The present implementation follows the conventions stated in http://dlmf.nist.gov/14.21 with a cut on the interval (-1,1). Some tests have been added to test_basic.py focusing on the behavior close to the real axis and close to the unit circle. The latter tests the absence of phase jumps which were present before. Also, one test in test_mpmath.py has been adapted to the new function.
…n't mention it.