[SciPy-dev] [Numpy-discussion] Re: numpy/scipy some remarks
robert.kern at gmail.com
Wed Jan 18 12:07:02 CST 2006
Fernando Perez wrote:
> Travis Oliphant wrote:
>>>3) pkgload() exists to support the loading of subpackages. It does not reach
>>>into numpy.dft or numpy.linalg at all. It is not relevant to this issue.
>>>4) There are some places in numpy that use numpy.dual.
>>>I think we can address all of your concerns by changing #4.
>>This is an accurate assessment. However, I do not want to eliminate
>>number 4 as I've mentioned before. I think there is a place for having
>>functions that can be over-written with better versions. I agree that
>>it could be implemented better, however, with some kind of register
>>function instead of automatically looking in scipy...
> Mmh, I think I'm confused then:
So am I, now!
> 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:
> where this was shown:
> In : import scipy
> Overwriting fft=<function fft at 0x2000000001474668> from
> scipy.fftpack.basic (was <function fft at 0x2000000001394a28> from
> Overwriting ifft=<function ifft at 0x20000000014746e0> from
> scipy.fftpack.basic (was <function inverse_fft at 0x2000000001394aa0> from
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
Imports to 'scipy' namespace
import lib -> success
Overwriting lib=<module 'scipy.lib' from
(was <module 'numpy.lib' from
import cluster -> success
import lib.blas -> success
>>> import numpy
<module 'numpy.lib' from
<module 'scipy.lib' from
[Ignore the SVN version numbers. They are faked. I was using checkouts from last
> I understood this as 'scipy.fftpack.basic.fft overwrote
> numpy.dft.fftpack.fft'. Does this then not affect the numpy namespace at all?
If it does, then I agree with you that this should change.
> 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.
It does take a verbose keyword argument.
robert.kern at gmail.com
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
More information about the Numpy-discussion