28 Jun 00:06
nunmpy.lookfor and scipy submodules
Emmanuelle Gouillart <emmanuelle.gouillart <at> normalesup.org>
2009-06-27 22:06:35 GMT
2009-06-27 22:06:35 GMT
Hi list,
while working on a course about scientific computing with Python,
I found myself playing with numpy.lookfor. To my surprise, I found that
the submodules of scipy are never searched by numpy.lookfor (see example
below). Apparently, this comes from the fact that the submodules are not
in scipy.__all__. I'm sure this is a very naive question, but why is it
so ? It can be quite confusing for people looking for documentation when
they don't find any match for 'optimize' in scipy... I'm using numpy
1.2.1 and scipy 0.7.
Thanks in advance,
Emmanuelle
Example:
>>> np.lookfor('optimize', module=scipy, import_modules=True)
Search results for 'optimize'
-----------------------------
>>> np.lookfor('interpol', module=scipy, import_modules=True)
Search results for 'interpol'
-----------------------------
scipy.interp
One-dimensional linear interpolation.
scipy.misc.imrotate
Rotate an image counter-clockwise by angle degrees.
scipy.sinc
Return the sinc function.
scipy.polyfit
Least squares polynomial fit.
scipy.bartlett
Return the Bartlett window.
scipy.ma.polyfit
Least squares polynomial fit.
>>> # nothing from scipy.interpolate !!
>>> np.lookfor('filename', os)
Search results for 'filename'
-----------------------------
os.open
Open a file (for low level IO).
os.mknod
Create a filesystem node (file, device special file or named pipe)
os.mkfifo
Create a FIFO (a POSIX named pipe).
os.path.realpath
Return the canonical path of the specified filename, eliminating any
os.walk
Directory tree generator.
os.path.walk
Directory tree walk with callback function.
>>> # With os, submodules are also searched
RSS Feed