[SciPy-Dev] legendre regression

josef.pktd at gmail.com josef.pktd at gmail.com
Mon Jan 31 13:38:20 EST 2011


On Mon, Jan 31, 2011 at 1:28 PM, Yaroslav Halchenko
<lists at onerussian.com> wrote:
> more fun (and pardon our elderly import numpy as N) ;-)
>
> *(Pdb) legendre(1)(N.array([-1.]))
> array([ inf])
> (Pdb) legendre(1)([-1.])
> array([-1.])
>
>
> On Mon, 31 Jan 2011, Yaroslav Halchenko wrote:
>
>> Switching to scipy (0.8.0) + numpy (1.5.1) from scipy (0.7.2) + numpy
>> (1.4.1) reveals regression:
>
>> *(Pdb) print legendre(1)(N.array([-0.999999999999 , -0.6, -0.2,  0.2,  0.6,  1. ]))
>> [-1.  -0.6 -0.2  0.2  0.6  1. ]
>
>> *(Pdb) print legendre(1)(N.array([-1 , -0.6, -0.2,  0.2,  0.6,  1. ]))
>> [ inf -0.6 -0.2  0.2  0.6  1. ]
>
>> while before it was giving correct boundary value (-1).
>
>> Could anyone please check if it is still present in current HEAD?  imho
>> worth a bugreport  (haven't ran into similar one upon query but decided to
>> check -- may be it was resolved already).

mine looks ok,

>>> special.legendre(1)(np.array([-0.999999999999 , -0.6, -0.2,  0.2,  0.6,  1. ]))
array([-1. , -0.6, -0.2,  0.2,  0.6,  1. ])
>>> special.legendre(1)(np.array([-1 , -0.6, -0.2,  0.2,  0.6,  1. ]))
array([-1. , -0.6, -0.2,  0.2,  0.6,  1. ])
>>> special.legendre(1)(np.array([-1,]))
array([-1.])
>>> special.legendre(1)(1.)
1.0
>>> special.legendre(1)(-1.)
-1.0

>>> special.legendre(1)([-1.])
array([-1.])

>>> import scipy
>>> scipy.__version__
'0.10.0.dev7027'

numpy 1.5.1

Josef
> --
> =------------------------------------------------------------------=
> Keep in touch                                     www.onerussian.com
> Yaroslav Halchenko                 www.ohloh.net/accounts/yarikoptic
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>



More information about the SciPy-Dev mailing list