[SciPy-dev] scipy.interpolate.fitpack patch
Nils Wagner
nwagner at iam.uni-stuttgart.de
Thu Feb 8 07:55:37 EST 2007
Nils Wagner wrote:
> John Travers wrote:
>
>> On 08/02/07, Nils Wagner <nwagner at iam.uni-stuttgart.de> wrote:
>>
>>
>>> John Travers wrote:
>>>
>>>
>>>> Hi Nils,
>>>> This seems strange to me. It is not finding the first root.Can you run
>>>>
>>>> /usr/lib64/python2.4/site-packages/scipy/interpolate/fitpack.py 3
>>>>
>>>> and
>>>>
>>>> /usr/lib64/python2.4/site-packages/scipy/sandbox/spline/fitpack.py 3
>>>>
>>>> and post the output please.
>>>>
>>>>
>>>>
>> ...
>>
>>
>>> Sure.
>>> python -i /usr/lib64/python2.4/site-packages/scipy/sandbox/spline/fitpack.py
>>>
>>>
>>
>>
>>> ******************************************
>>> Tests of sproot
>>> ******************************************
>>> k : Roots of s(x) approx sin(x) x in [0.0,15.0]:
>>> 3 : [3.1418159268145143, 6.283324249558861, 9.4246967197029239,
>>> 12.566327676063914]
>>>
>>>
>>
>>
>>> python -i /usr/lib64/python2.4/site-packages/scipy/interpolate/fitpack.py
>>>
>>>
>>
>>
>>> 3 : [3.1418159268145143, 6.283324249558861, 9.4246967197029239,
>>> 12.566327676063914]
>>>
>>>
>> So the original fitpack doesn't find the first root either - strange
>> that this works on my machine, but not yours. Given that the other
>> roots look good I don't think there is a major problem. I think I'll
>> just modify the test to not complain if the first root is not found
>> for now.
>>
>> Cheers,
>> John
>> _______________________________________________
>> Scipy-dev mailing list
>> Scipy-dev at scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-dev
>>
>>
> Maybe a 64-bit issue ???
> uname -a
> Linux lisa 2.6.13-15.13-default #1 Tue Nov 28 13:43:50 UTC 2006 x86_64
> x86_64 x86_64 GNU/Linux
>
> Nils
>
> I can run the test on a 32-bit machine if needed.
>
> Nils
>
>
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>
Hi John,
Here is the output of a 32-bit machine. Now the first root is detected !
Linux amanda 2.6.11.4-21.15-default #1 Tue Nov 28 13:39:58 UTC 2006 i686
athlon i386 GNU/Linux
python -i /usr/lib/python2.4/site-packages/scipy/interpolate/fitpack.py 3
******************************************
Tests of sproot
******************************************
k : Roots of s(x) approx sin(x) x in [0.0,15.0]:
1 : [3.8917895437452756, 7.0333244206998957, 10.174697656280109,
13.316162856466084]
2 : [3.5167921082175266, 6.6583244127250936, 9.7996976309412744,
12.948449169566706]
3 : [6.2076311686417224e-18, 3.1418159268145143, 6.283324249558861,
9.4246967197029239, 12.566327676063914]
4 : [3.5377683941038813, 6.6583251439401883, 9.7996965906036593,
12.991740973097126]
5 : [4.0693671011759172, 7.0333276059930698, 10.174703377002832,
13.532636947291909]
Note that if k is not 3, some roots are missed or incorrect
>>>
/home/nwagner> python -i
/usr/lib/python2.4/site-packages/scipy/sandbox/spline/fitpack.py 3
******************************************
Tests of sproot
******************************************
k : Roots of s(x) approx sin(x) x in [0.0,15.0]:
3 : [6.2076311686417224e-18, 3.1418159268145143, 6.283324249558861,
9.4246967197029239, 12.566327676063914]
Note that if k is not 3, some roots are missed or incorrect
Nils
More information about the SciPy-Dev
mailing list