scipy/scipy — pull request #3015 by gertingold (2013-10-23 22:05:10+00:00)
Title: ENH: choice of cuts in Legendre P function

Following the discussion in gh-2840 and also in view of gh-2396, I have implemented a version of the Legendre P function for complex arguments where by means of a variable ``type`` the form of the cut can be chosen. The possible values of ``type`` are consistent with those used in ``mpmath``. Some tests have been adapted to make use of ``type``. In addition, a test of the derivative of the Legendre P function, which so far was untested, has been introduced.

If this form of implementing the different choices of cuts is acceptable, I would think about doing the same for the Legendre Q function. There, the choice of the cut influences the result more strongly than for the Legendre P function. Therefore, implementing corresponding changes to the Legendre Q function is even more important than for the Legendre P function.