[SciPy-Dev] Functions auto-listed by http://docs.scipy.org/scipy/docs/scipy/
Mon Jun 21 14:41:51 CDT 2010
On Mon, Jun 21, 2010 at 9:19 AM, David Goldsmith <email@example.com>wrote:
> On Mon, Jun 21, 2010 at 1:08 AM, Pauli Virtanen <firstname.lastname@example.org> 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.
OK, when I use the Wiki Source link when View-ing the docstring for
scipy.absolute, e.g., and search the resulting page for absolute, it's not
found at all - I'm assuming this is an example of where the numpy function
has simply been imported into the scipy namespace, and that similar results
indicate a similar situation...
>> > 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?
>> 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
> 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)
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...
More information about the SciPy-Dev