diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-01-08 07:15:18 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-01-08 07:15:18 +0000 |
commit | a71140e506732899d279269bd3ac98be9e823cec (patch) | |
tree | 18d102c6c945529cf634601953f4696f87602728 /numpy/dual.py | |
parent | 4596572c65c77590fff709a85a3992254cc145d3 (diff) | |
download | numpy-a71140e506732899d279269bd3ac98be9e823cec.tar.gz |
Fixed up so that at least element-size is allocated and iterator of size-0 raises an error
Diffstat (limited to 'numpy/dual.py')
-rw-r--r-- | numpy/dual.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/numpy/dual.py b/numpy/dual.py index 32baa020e..2a5e0e101 100644 --- a/numpy/dual.py +++ b/numpy/dual.py @@ -7,19 +7,26 @@ __all__ = ['fft','ifft','fftn','ifftn','fft2','ifft2', 'inv','svd','solve','det','eig','eigvals','lstsq', 'pinv','cholesky','i0'] -try: - import scipy.linalg as linpkg -except ImportError: - import numpy.linalg as linpkg +# First check to see that scipy is "new" scipy +# Perhaps we could check to see if the functions actually work in +# the scipy that will be imported. + +have_scipy = 0 try: - import scipy.fftpack as fftpkg + import scipy + if scipy.__version__ >= '0.4.4': + have_scipy = 1 except ImportError: - import numpy.dft as fftpkg + pass -try: +if have_scipy: + import scipy.linalg as linpkg + import scipy.fftpack as fftpkg from scipy.special import i0 -except ImportError: +else: + import numpy.linalg as linpkg + import numpy.dft as fftpkg from numpy.lib import i0 fft = fftpkg.fft |