On Mon, Jun 21, 2010 at 1:08 AM, Pauli Virtanen <span dir="ltr"><<a href="mailto:pav@iki.fi">pav@iki.fi</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Sun, 20 Jun 2010 23:18:45 -0700, David Goldsmith wrote:<br>
> Hi!  The Contents section of the scipy (package) docstring states:<br>
> "SciPy imports all the functions from the NumPy namespace"; then,<br>
> further down in the Wiki rendering of that scipy docstring, there's an<br>
> auto-generated list of Functions (absolute, add, ..., true_divide,<br>
> trunc).  Are these the NumPy namespace functions referred to in the<br>
> Contents section?  If so, why are they links to scipy object docstrings?<br>
> (In scipy, are they just wrappers for the corresponding numpy<br>
> functions?)<br>
<br>
</div>They're for the most part functions imported from numpy, which the system<br>
doesn't realize come from there.<br></blockquote><div><br>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.<br><br>DG<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
> If not, many (all?) duplicate functions available in NumPy<br>
<br>
</div>Not all. Probably only those that do not have a __module__ attribute<br>
defined. They'll also appear only once.<br>
<br>
Unfortunately, ufuncs for instance don't have them, since they are not<br>
"real" Python functions, but class instances.<br>
<br>
> - is this intended?<br>
<br>
Nope.<br>
<br>
But in the way it's implemented now (introspection in Python), it's not<br>
really possible to tell whether a ufunc present in a module comes from<br>
Numpy or somewhere else, since ufuncs don't carry any information<br>
identifying where they come from.<br>
<br>
--<br>
<font color="#888888">Pauli Virtanen<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
SciPy-Dev mailing list<br>
<a href="mailto:SciPy-Dev@scipy.org">SciPy-Dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/scipy-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/scipy-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Mathematician: noun, someone who disavows certainty when their uncertainty set is non-empty, even if that set has measure zero.<br><br>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)<br>