[SciPy-user] Possible bug with Hermite polynomials

Karol Langner karol.langner at kn.pl
Tue Jun 13 02:08:08 CDT 2006


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

-- 
written by Karol Langner
wto cze 13 09:06:18 CEST 2006



More information about the SciPy-user mailing list