[SciPy-dev] doc question: special.orthogonal.p_roots and co
Tue Dec 8 08:47:16 CST 2009
On Tue, Dec 8, 2009 at 9:11 AM, Ralf Gommers
> On Mon, Dec 7, 2009 at 5:43 AM, <firstname.lastname@example.org> wrote:
>> On Sun, Dec 6, 2009 at 3:59 PM, Ralf Gommers
>> <email@example.com> wrote:
>> > On Sun, Dec 6, 2009 at 5:46 PM, <firstname.lastname@example.org> wrote:
>> >> I was looking for the Legendre points and weights for Gaussian
>> >> quadrature.
>> >> In the source of integrate.quadrature, I found the use of
>> >> special.orthogonal.p_roots
>> >> It is not in my (oldish) htmlhelp
>> >> p_roots and co are not links in
>> >> http://docs.scipy.org/scipy/docs/scipy.special.orthogonal/
>> >> on the doc page for them, they show up as
>> >> Note: This docstring is obsolete; the corresponding object is no
>> >> longer present in SVN.
>> >> http://docs.scipy.org/scipy/docs/scipy.special.orthogonal.p_roots/
>> >> in trunk they are still available:
>> >> http://projects.scipy.org/scipy/browser/trunk/scipy/special/orthogonal.py#L602
>> >> Is this a documentation bug, or are there some changes that I didn't
>> >> see?
>> > In rev 6070 Pauli added an __all__ dict to orthogonal.py that does not
>> > include those functions. I think pydocweb only generates pages for
>> > objects
>> > in __all__ if that exists. So it looks like that is the reason.
>> > Should all the xx_roots funcs be in __all__ in your opinion?
>> I would think so, but I just saw them for the first time and found them
>> only because I looked at the source of integrate.quadrature.
> Now that I looked a bit closer, I see that all the xx_roots functions have a
> corresponding new (and I suppose improved) function in orthogonal.py. For
> 'p_roots' this is 'legendre', they seem to return the same thing. So just
> use the latter I think.
> Leaving the xx_roots functions out of __all__ was done on purpose then I
> guess, and those functions are still floating around only because of
> backwards compatibility reasons. The one thing that needs to be done is to
> update the module docstring to reflect that.
I had seen legendre before I went looking for p_roots.
legendre calls p_roots and returns a polynomial, which I don't know how to
I was just looking for weights and points, and p_roots returns exactly
what I saw in other references.
Given that p_roots is used, I assume it is not depreciated, the fact
that these functions are listed in the docs also indicates that they
are not internal private functions.
> SciPy-Dev mailing list
More information about the SciPy-Dev