[SciPy-dev] [Numpy-discussion] Re: numpy/scipy some remarks
Pearu Peterson
pearu at scipy.org
Wed Jan 18 14:15:01 CST 2006
On Wed, 18 Jan 2006, Fernando Perez wrote:
> Mmh, I think I'm confused then: it seemed to me that pkgload() WAS
> overwriting numpy names, from the messages which the environment variable
> controls. Is that not true? Here's a recent thread:
>
> http://aspn.activestate.com/ASPN/Mail/Message/scipy-dev/2974044
pkgload() is overwriting numpy names in *scipy namespace*. To be explicit,
the following is going on in scipy/__init__.py when pkgload is called,
pseudocode follows:
from numpy import * # imports fft
old_fft = fft
from scipy.fftpack import fft
print 'Overwriting',old_fft,'with',fft
del old_fft
And nothing else! So, scipy.fft, that was numpy.fft, is set to
scipy.fftpack.fft. numpy.fft remains the same.
...
> I understood this as 'scipy.fftpack.basic.fft overwrote
> numpy.dft.fftpack.fft'. Does this then not affect the numpy namespace at
> all?
No! See above.
> I also would like to propose that, rather than using an environment variable,
> pkgload() takes a 'verbose=' keyword (or 'quiet='). I think it's much
> cleaner to say
>
> pkgload(quiet=1) or pkgload(verbose=0)
>
> than relying on users configuring env. variables for something like this.
pkgload has already verbose kwd argumend. See ?pkgload for more
information.
Pearu
More information about the Numpy-discussion
mailing list