[SciPy-user] Docs for Krogh Interpolator
Anne Archibald
peridot.faceted@gmail....
Wed May 13 06:41:07 CDT 2009
2009/5/13 Joshua Stults <joshua.stults@gmail.com>:
> By docstrings do you mean the text from:
>
> import scipy.interpolate
> print scipy.interpolate.KroghInterpolator.__doc__
>
> That gives me the same two paragraphs that are in the html
> documentation page. I'm using Python version 2.5.2 and scipy as
> packaged for Fedora 10.
Actually the information is in
scipy.interpolate.KroghInterpolator.__init__.__doc__, that is, the
documentation on how to construct an object of class KroghInterpolator
is in the constructor docstring, rather than the class docstring. This
is generally confusing and frustrating, but putting it all in the
class docstring is not really a solution, since the docstring really
does describe the constructor.
Even more unfortunately, this docstring does not appear to be present
in the online doc editor. But you can see it by doing
help(scipy.interpolate.KroghInterpolator), which will show the class
docstring, list the methods, and show all their docstrings.
For convenience, here is the content of the constructor docstring:
"""Construct an interpolator passing through the specified points
The polynomial passes through all the pairs (xi,yi). One may
additionally
specify a number of derivatives at each point xi; this is done by
repeating the value xi and specifying the derivatives as successive
yi values.
Parameters
----------
xi : array-like, length N
known x-coordinates
yi : array-like, N by R
known y-coordinates, interpreted as vectors of length R,
or scalars if R=1
Example
-------
To produce a polynomial that is zero at 0 and 1 and has
derivative 2 at 0, call
>>> KroghInterpolator([0,0,1],[0,2,0])
"""
Could be better, I admit, but it is there.
Anne
> On Wed, May 13, 2009 at 7:26 AM, Pauli Virtanen <pav@iki.fi> wrote:
>> Wed, 13 May 2009 07:19:56 -0400, Joshua Stults kirjoitti:
>>> The docs for doing Hermite polynomial interpolation (specifying function
>>> and derivative values at points), seem a little lacking:
>>>
>>> http://docs.scipy.org/doc/scipy/reference/generated/
>> scipy.interpolate.KroghInterpolator.html
>> [clip]
>>
>> This is a problem in how our Sphinx documentation is organized. The
>> documentation is available in the docstrings, but does not end up in the
>> HTML docs. Needs fixing...
>>
>> --
>> Pauli Virtanen
>>
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>
>
>
>
> --
> Joshua Stults
> Website: http://j-stults.blogspot.com
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
More information about the SciPy-user
mailing list