[SciPy-dev] numpy/scipy some remarks
Arnd Baecker
arnd.baecker at web.de
Wed Jan 18 03:55:51 CST 2006
Hi,
thanks for your comments Pearu!
On Wed, 18 Jan 2006, Pearu Peterson wrote:
> On Wed, 18 Jan 2006, Arnd Baecker wrote:
>
> > Hi,
> >
> > I just successfully installed a recent numpy/scipy using MKL as math
> > library on Itanium2.
> > I have few minor comments, which might cause confusion
> > to new-comers (and me as well;-) to the numpy/scipy combo:
> >
> > 1.) What does the overwriting stuff mean?
> >
> > In [1]: import scipy
> > In [2]: scipy.pkgload()
> > Overwriting lib=<module 'scipy.lib' from
> > '/home/baecker/python2/scipy_icc_lintst_n_mkl/lib/python2.4/site-packages/scipy/lib/__init__.pyc'>
> > from
> > /home/baecker/python2/scipy_icc_lintst_n_mkl/lib/python2.4/site-packages/scipy/lib/__init__.pyc
> > (was <module 'numpy.lib' from
> > '/home/baecker/python2/scipy_icc_lintst_n_mkl/lib/python2.4/site-packages/numpy/lib/__init__.pyc'>
> > from
> > /home/baecker/python2/scipy_icc_lintst_n_mkl/lib/python2.4/site-packages/numpy/lib/__init__.pyc)
>
> It means exactly what is written. You can disable these messages by
> defining env variable:
>
> export SCIPY_IMPORT_VERBOSE=-1
>
> Basically, it says which numpy symbols are overwritten by scipy symbols in
> scipy namespace. Only scipy developers should watch out these messages.
Fair enough ;-) Shouldn't then the default be
SCIPY_IMPORT_VERBOSE=-1
so that that normal users don't see this?
[...]
> > 4.) help(scipy)
> >
> > Contents
> > --------
> >
> > numpy name space
> >
> > [[ looks quite empty here -
> > is any more contents (eg. a short example?) planned ]]
>
> Yes, documentation patches are welcome.
OK. I will see if I can write a few lines.
> > Available subpackages
> > ---------------------
> > stats --- Statistical Functions [*]
> > sparse --- Sparse matrix [*]
> > lib --- Python wrappers to external libraries [*]
> > linalg --- Linear algebra routines [*]
> > signal --- Signal Processing Tools [*]
> > misc --- Various utilities that don't have another home.
> > interpolate --- Interpolation Tools [*]
> > optimize --- Optimization Tools [*]
> > cluster --- Vector Quantization / Kmeans [*]
> > fftpack --- Discrete Fourier Transform algorithms [*]
> > io --- Data input and output [*]
> > integrate --- Integration routines [*]
> > lib.lapack --- Wrappers to LAPACK library [*]
> > special --- Special Functions [*]
> > lib.blas --- Wrappers to BLAS library [*]
> > [*] - using a package requires explicit import (see pkgload)
> >
> > [[ couldn't one get rid of all these [*]? They don't look nice.
> > Only `misc` is different ]]
>
> :) Suggestions how to denote packages that require explicit import more
> nicely are welcome.
What about something like this at the end:
"""All the above packages require an implicit import.
The only exception is the `misc` subpackages whose symbols
are made available in the `numpy` namespace.
"""
> > Global symbols from subpackages
> > -------------------------------
> > stats --> find_repeats
> > misc --> info, factorial, factorial2, factorialk, comb, who, lena,
> > central_diff_weights, derivative, pade, source
> > fftpack --> fft, fftn, fft2, ifft, ifft2, ifftn, fftshift, ifftshift,
> > fftfreq
> >
> > Utility tools
> > -------------
> >
> > test --- Run scipy unittests
> > pkgload --- Load scipy packages
> > show_config --- Show scipy build configuration
> > show_numpy_config --- Show numpy build configuration
> >
> > [[ this is directly mapped to `numpy`s show - is it really needed here
> > as well? ]]
> >
> > __version__ --- Scipy version string
> > __numpy_version__ --- Numpy version string
>
> The tools are different though. Compare scipy.test() with numpy.test() for
> instance. The same holds for other symbols. So, the answer is yes, they
> are needed.
Still confused: clearly scipy.test() and numpy.test()
are different, but:
In [1]: import scipy
In [2]: scipy.show_numpy_config?
Type: function
Base Class: <type 'function'>
String Form: <function show at 0x2000000000969a28>
Namespace: Interactive
File:
/home/baecker/python2/scipy_icc_lintst_n_mkl/lib/python2.4/site-packages/numpy/__config__.py
Definition: scipy.show_numpy_config()
So this is directly mapped to numpy.
Concerning __numpy_version__: if this is the present version
of numpy (and not the one used during build), why do we need
scipy.__numpy_version__
and
numpy.__version__
?
> > [[ same with this one, why not just have it in numpy?]]
> > Environment variables
> > ---------------------
> >
> > SCIPY_IMPORT_VERBOSE --- pkgload verbose flag, default is 0.
>
> See previous answer.
;-) well, this wasn't a question, it was just a straight copy
from `help(scipy)` - sorry for making this not clear enough.
Best,
Arnd
More information about the Scipy-dev
mailing list