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

Pauli Virtanen pav@iki...
Mon Jun 21 03:08:15 CDT 2010


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.

> 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



More information about the SciPy-Dev mailing list