Skip to content

Commit

Permalink
Avoid next_fast_len from deprecated helper namespace (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkannawadi authored Jun 21, 2023
1 parent 5b0b5e0 commit 45187fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scarlet/fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,17 @@ def _get_fft_shape(im_or_shape1, im_or_shape2, padding=3, axes=None, max=False):

shape += padding
# Use the next fastest shape in each dimension
shape = [fftpack.helper.next_fast_len(s) for s in shape]
shape = [fftpack.next_fast_len(s) for s in shape]

# autograd.numpy.fft does not currently work
# if the last dimension is odd
while shape[-1] % 2 != 0:
shape[-1] += 1
shape[-1] = fftpack.helper.next_fast_len(shape[-1])
shape[-1] = fftpack.next_fast_len(shape[-1])
if shape2[-2] % 2 == 0:
while shape[-2] % 2 != 0:
shape[-2] += 1
shape[-2] = fftpack.helper.next_fast_len(shape[-2])
shape[-2] = fftpack.next_fast_len(shape[-2])

return shape

Expand Down

0 comments on commit 45187fd

Please sign in to comment.