|
68 | 68 | import subprocess |
69 | 69 | import h5py |
70 | 70 |
|
71 | | -from distutils.version import LooseVersion |
72 | | - |
73 | 71 | import numpy as np |
74 | 72 | import scipy |
75 | 73 | import scipy.special |
@@ -2923,16 +2921,11 @@ def fft(c, n=None, axis=-1, norm=None): |
2923 | 2921 | :type norm: None, "ortho", optional |
2924 | 2922 | :return: Curve tuple -- Two curves with the real and imaginary parts. |
2925 | 2923 | """ |
2926 | | - numpy1_10 = LooseVersion(np.__version__) >= LooseVersion("1.10.0") |
2927 | 2924 | cnorm = c.normalize() |
2928 | 2925 | clen = len(c.x) |
2929 | 2926 |
|
2930 | | - if numpy1_10: |
2931 | | - complex_array = np.fft.fft(cnorm.y, n, axis, norm) |
2932 | | - complex_array = np.fft.fftshift(complex_array) |
2933 | | - else: |
2934 | | - complex_array = np.fft.fft(cnorm.y, n, axis) |
2935 | | - complex_array = np.fft.fftshift(complex_array) |
| 2927 | + complex_array = np.fft.fft(cnorm.y, n, axis, norm) |
| 2928 | + complex_array = np.fft.fftshift(complex_array) |
2936 | 2929 |
|
2937 | 2930 | val = 1.0 / (float(max(cnorm.x) - min(cnorm.x)) / 2.0) |
2938 | 2931 | x = np.fft.fftfreq(clen, d=val) |
@@ -3983,12 +3976,7 @@ def __ifft(cr, ci): |
3983 | 3976 | """ |
3984 | 3977 | carray = cr.y + 1j * ci.y |
3985 | 3978 |
|
3986 | | - numpy1_10 = LooseVersion(np.__version__) >= LooseVersion("1.10.0") |
3987 | | - |
3988 | | - if numpy1_10: |
3989 | | - complex_array = np.fft.ifft(carray) |
3990 | | - else: |
3991 | | - complex_array = np.fft.ifft(carray) |
| 3979 | + complex_array = np.fft.ifft(carray) |
3992 | 3980 |
|
3993 | 3981 | # nc1.x = np.array(cr.x) |
3994 | 3982 | nc1y = complex_array.real |
|
0 commit comments