Commit d4cd300
committed
BUG: Fixed issue #4
Because assignment `a[tind] = func(...)` amounts to overwriting
data in array `a`, a copy is needed, if not already made.
```ipython
In [1]: import numpy as np, mkl_fft
In [2]: x = np.random.randn(4,4,4)
In [3]: xc = x.copy()
In [4]: y = mkl_fft._numpy_fft.rfftn(x)
In [5]: yc = y.copy()
In [6]: z = mkl_fft._numpy_fft.irfftn(y)
In [7]: np.allclose(y, yc)
Out[7]: True
In [8]: np.allclose(z, x)
Out[8]: True
```1 parent 21ef9d4 commit d4cd300
1 file changed
+9
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | 108 | | |
111 | 109 | | |
| 110 | + | |
| 111 | + | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
815 | | - | |
| 815 | + | |
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
850 | 854 | | |
851 | 855 | | |
852 | 856 | | |
853 | 857 | | |
854 | 858 | | |
855 | 859 | | |
856 | 860 | | |
857 | | - | |
858 | | - | |
| 861 | + | |
859 | 862 | | |
860 | 863 | | |
861 | 864 | | |
| |||
0 commit comments