Skip to content

Commit

Permalink
Merge pull request soft-matter#209 from caspervdw/pyfftw-fix
Browse files Browse the repository at this point in the history
FIX: Change datatype instead of copying array
  • Loading branch information
danielballan committed Mar 9, 2015
2 parents df79f3c + a7302f1 commit b97522d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions trackpy/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ def fftn(a):
"*much* faster.")
planned = True
a = pyfftw.n_byte_align(a, a.dtype.alignment)
result = np.empty_like(a, dtype=np.complex128)
result[:] = pyfftw.interfaces.numpy_fft.fftn(a)
return result
return pyfftw.interfaces.numpy_fft.fftn(a).astype(np.complex128)

def ifftn(a):
a = pyfftw.n_byte_align(a, a.dtype.alignment)
Expand Down

0 comments on commit b97522d

Please sign in to comment.