[SciPy-user] Possible bug with Hermite polynomials

Nils Wagner nwagner at iam.uni-stuttgart.de
Tue Jun 13 02:13:46 CDT 2006


Karol Langner wrote:
> On Tuesday 13 June 2006 08:57, Steffen Loeck wrote:
>   
>> Hello,
>>
>> there seems to be a problem using elements of an array as first argument in
>>
>> the Hermite functions:
>>     
>>>> import scipy
>>>> scipy.__version__
>>>>         
>> '0.5.0.1941'
>>
>>     
>>>> a = scipy.arange(10)
>>>>
>>>> import scipy.special
>>>>
>>>> scipy.special.hermite(1)(2.0)
>>>>         
>> 4.0
>>
>>     
>>>> scipy.special.hermite(a[1])(2.0)
>>>>         
>> 0.0
>>
>> The result using the element of array 'a' is 0.0, while 4.0 is correct.
>> Is there any way to fix this problem?
>>
>> Regards,
>> Steffen
>>
>>     
>
> I don't know what causes this, but I've noticed that it works fine in version 
> 0.3.2, for instance:
>   
>>>> import scipy.special
>>>> scipy.__version__
>>>>         
> '0.3.2'
>   
>>>> scipy.special.hermite
>>>>         
> <function hermite at 0x4045a144>
>   
>>>> scipy.special.hermite(1)(2.0)
>>>>         
> 4.0
>   
>>>> a = scipy.arange(10)
>>>> a
>>>>         
> array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>   
>>>> scipy.special.hermite(a[1])(2.0)
>>>>         
> 4.0
>
> Cheers,
> Karol
>
>   
Fixed in latest svn

>>> a = scipy.arange(10)
>>> a
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> import scipy.special
>>> scipy.special.hermite(1)(2.0)
4.0
>>> scipy.special.hermite(a[1])(2.0)
4.0
>>> scipy.__version__
'0.5.0.1951'
>>> numpy.__version__
'0.9.9.2613'



 



More information about the SciPy-user mailing list