[SciPy-Dev] Functions auto-listed by http://docs.scipy.org/scipy/docs/scipy/

David Goldsmith d.l.goldsmith at gmail.com
Mon Jun 21 12:19:06 EDT 2010


On Mon, Jun 21, 2010 at 1:08 AM, Pauli Virtanen <pav at iki.fi> wrote:

> Sun, 20 Jun 2010 23:18:45 -0700, David Goldsmith wrote:
> > Hi!  The Contents section of the scipy (package) docstring states:
> > "SciPy imports all the functions from the NumPy namespace"; then,
> > further down in the Wiki rendering of that scipy docstring, there's an
> > auto-generated list of Functions (absolute, add, ..., true_divide,
> > trunc).  Are these the NumPy namespace functions referred to in the
> > Contents section?  If so, why are they links to scipy object docstrings?
> > (In scipy, are they just wrappers for the corresponding numpy
> > functions?)
>
> They're for the most part functions imported from numpy, which the system
> doesn't realize come from there.
>

So docstring editors simply need to determine which are which (e.g., by
looking at the code) and document only those that are not being so imported.

DG

>
> > If not, many (all?) duplicate functions available in NumPy
>
> Not all. Probably only those that do not have a __module__ attribute
> defined. They'll also appear only once.
>
> Unfortunately, ufuncs for instance don't have them, since they are not
> "real" Python functions, but class instances.
>
> > - is this intended?
>
> Nope.
>
> But in the way it's implemented now (introspection in Python), it's not
> really possible to tell whether a ufunc present in a module comes from
> Numpy or somewhere else, since ufuncs don't carry any information
> identifying where they come from.
>
> --
> Pauli Virtanen
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>



-- 
Mathematician: noun, someone who disavows certainty when their uncertainty
set is non-empty, even if that set has measure zero.

Hope: noun, that delusive spirit which escaped Pandora's jar and, with her
lies, prevents mankind from committing a general suicide.  (As interpreted
by Robert Graves)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20100621/ede350f0/attachment.html>


More information about the SciPy-Dev mailing list