[SciPy-dev] Pade approximants
Nils Wagner
nwagner at mecha.uni-stuttgart.de
Wed Feb 23 14:31:39 EST 2005
On Wed, 23 Feb 2005 10:54:41 -0800
Robert Kern <rkern at ucsd.edu> wrote:
> Nils Wagner wrote:
>> On Wed, 23 Feb 2005 09:43:03 -0800
>> Robert Kern <rkern at ucsd.edu> wrote:
>>
>>> Nils Wagner wrote:
>>>
>>>> Hi all,
>>>>
>>>> Has someone written a wrapper for the FORTRAN subroutine
>>>>pade
>>>> which is available through
>>>> http://lib-www.lanl.gov/numerical/bookfpdf/f5-12.pdf
>>>>
>>>> It would be nice to have a function called pade in scipy
>>>>:-) .
>>>>
>>>> Any comments or suggestions ?
>>>
>>>
>>> Anything wrong with the one that's already there?
>>>
>> Oops, I have ignored that.
>
> Apparently. Please try searching the code before posting
>in the future.
>
>> Anyway, it doesn't provide the user with a residual
>> as in the case of Numerical Recipes routine.
>
> See if you can add the functionality to the existing
>implementation. We will not include Numerical Recipes
>code into Scipy. It is not available under a suitable
>license.
>
>> What is the meaning of poly1d
>
> Read the code before asking here. We're more than happy
>to answer questions here *if* you've spent some time
>trying to answer them yourself. Otherwise, it's
>incredibly annoying.
>
Indeed and I agree with you.
On the other hand all these nasty
questions can be avoided by a c o m p l e t e SciPy
tutorial.
A search yields one result with respect to Pade page 39.
May be an "instructive" example can be added
from scipy import *
from scipy.xplt import *
import gui_thread
cof = array(([1.0,1.0,1.0/2,1./6,1./24]))
p,q = pade(cof,2)
t = arange(0,2,0.1)
xplt.plot(t,p(t)/q(t),'b+',t,exp(t),'r-')
xplt.legend(['Pade approximant','exp(x)'])
xplt.xlabel('x')
xplt.ylabel('f(x)')
xplt.eps('pade',pdf=1)
What is your opinion ?
Nils
> --
> Robert Kern
> rkern at ucsd.edu
>
> "In the fields of hell where the grass grows high
> Are the graves of dreams allowed to die."
> -- Richard Harter
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-dev
More information about the SciPy-Dev
mailing list