(x)
| 27 | |
| 28 | |
| 29 | def to_complex(x): |
| 30 | x = np.array(x) |
| 31 | if x.dtype in (np.complex64, np.complex128): |
| 32 | return x |
| 33 | elif x.dtype == np.float64: |
| 34 | return x.astype(np.complex128) |
| 35 | else: |
| 36 | return x.astype(np.complex64) |
| 37 | |
| 38 | |
| 39 | def fftfreq(resolution, mode="vector", dtype=None): |