[Scipy-tickets] [SciPy] #465: scipy.special.basic.assoc_laguerre has wrong 0th order behavior.

SciPy scipy-tickets@scipy....
Sun Nov 9 18:56:01 CST 2008


#465: scipy.special.basic.assoc_laguerre has wrong 0th order behavior.
---------------------------+------------------------------------------------
 Reporter:  alexiaschulz   |        Owner:  somebody
     Type:  defect         |       Status:  new     
 Priority:  normal         |    Milestone:  0.7.0   
Component:  scipy.special  |      Version:          
 Severity:  normal         |   Resolution:          
 Keywords:                 |  
---------------------------+------------------------------------------------
Comment (by pv):

 I can't reproduce this (Scipy r5032)
 {{{
 >>> import scipy.special
 >>> import numpy as np
 >>> x = np.random.randn(20000)
 >>> k = np.random.randn(20000)
 >>> v = scipy.special.assoc_laguerre(x, 0, k)
 >>> np.allclose(v, 1)
 True
 >>> scipy.special.assoc_laguerre(0, 0, 0)
 1.0
 >>> scipy.special.assoc_laguerre(3, 0, 10)
 1.0
 >>> scipy.special.assoc_laguerre(3, 0, -2.3)
 1.0
 }}}

 However, the result can be inf:
 {{{
 >>> scipy.special.assoc_laguerre(0, 0, -2)
 inf
 >>> scipy.special.assoc_laguerre(2, 0, -2)
 inf
 }}}
 This comes from
 {{{
 >>> s.hyp1f1(0, -0.99999, 0)
 1.0
 >>> s.hyp1f1(0, -1, 0)
 inf
 >>> s.hyp1f1(0, -1.00001, 0)
 1.0
 }}}
 ie. hyp1f1 is buggy -- hyp1f1(0, b, z) should be identically 1 (see eg.
 http://functions.wolfram.com/HypergeometricFunctions/Hypergeometric1F1/03/01/03/0003/
 )

 I don't see where zero values could come from, however.

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/465#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