[Scipy-tickets] [SciPy] #1296: associated legendre polynomials in scipy.special fail for calculations with degree higher than approx. 22

SciPy Trac scipy-tickets@scipy....
Sat Oct 9 20:10:53 CDT 2010


#1296: associated legendre polynomials in scipy.special fail for calculations with
degree higher than approx. 22
------------------------------+---------------------------------------------
 Reporter:  josip.mihaljevic  |       Owner:  pv   
     Type:  defect            |      Status:  new  
 Priority:  high              |   Milestone:  0.9.0
Component:  scipy.special     |     Version:  0.7.0
 Keywords:  legendre          |  
------------------------------+---------------------------------------------

Comment(by charris):

 I suppose you could also get them by differentiating the Legendre
 polynomials in numpy m times and multiplying by (-1)^m * (1 - x^2)^{m/2}


 {{{
 In [1]: from numpy.polynomial import Legendre as L

 In [2]: L([0]*16 + [1])(.001)
 Out[2]: 0.19635390806272029

 In [3]: L([0]*22 + [1])(.001)
 Out[3]: -0.16814554527766903

 In [4]: L([0]*40 + [1])(.001)
 Out[4]: 0.12526789765344837

 In [5]: L([0]*40 + [1]).deriv(5)(.001)*(1 - .001**2)**(2.5)*(-1)**5
 Out[5]: 544114.32957297761

 }}}

 But a direct implementation is probably preferable if you just want a
 value.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1296#comment:2>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list