Skip to content

Commit

Permalink
adjust to be compatable with depricated numpy syntax:
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebrv-q committed Apr 4, 2024
1 parent f95d959 commit 239cf4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions image_registration/fft_tools/shift.py
Expand Up @@ -98,12 +98,12 @@ def shiftnd(data, offset, phase=0, nthreads=1, use_numpy_fft=False,
data = np.nan_to_num(data)

freq_grid = np.sum(
[off*np.fft.fftfreq(nx)[
np.array([off*np.fft.fftfreq(nx)[
tuple(
[np.newaxis]*dim + [slice(None)] + [np.newaxis]*(data.ndim-dim-1)
)
]
for dim,(off,nx) in enumerate(zip(offset,data.shape))],
for dim,(off,nx) in enumerate(zip(offset,data.shape))],dtype=object),
axis=0)

kernel = np.exp(-1j*2*np.pi*freq_grid-1j*phase)
Expand Down

0 comments on commit 239cf4c

Please sign in to comment.