How ifftshift was implemented in v1.14
(x, axes=None)
| 104 | return y |
| 105 | |
| 106 | def original_ifftshift(x, axes=None): |
| 107 | """ How ifftshift was implemented in v1.14 """ |
| 108 | tmp = asarray(x) |
| 109 | ndim = tmp.ndim |
| 110 | if axes is None: |
| 111 | axes = list(range(ndim)) |
| 112 | elif isinstance(axes, int): |
| 113 | axes = (axes,) |
| 114 | y = tmp |
| 115 | for k in axes: |
| 116 | n = tmp.shape[k] |
| 117 | p2 = n - (n + 1) // 2 |
| 118 | mylist = concatenate((arange(p2, n), arange(p2))) |
| 119 | y = take(y, mylist, k) |
| 120 | return y |
| 121 | |
| 122 | # create possible 2d array combinations and try all possible keywords |
| 123 | # compare output to original functions |
nothing calls this directly
no test coverage detected