Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy scipy.fftpack #516

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ptypy/core/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:license: see LICENSE for details.
"""
import numpy as np
from scipy import fftpack
import scipy.fft

from .. import utils as u
from ..utils.verbose import logger
Expand Down Expand Up @@ -55,7 +55,7 @@ class Geo(Base):
If set to True, changes to properties like :py:meth:`energy`,
:py:meth:`lam`, :py:meth:`shape` or :py:meth:`psize` will cause
a call to :py:meth:`update`.


Default geometry parameters. See also :py:data:`.scan.geometry`

Expand Down Expand Up @@ -471,8 +471,8 @@ def _FFTW_fft(self):
self.ifft = lambda x: fftw_np.ifft2(x, planner_effort=pe)

def _scipy_fft(self):
self.fft = lambda x: fftpack.fft2(x).astype(x.dtype)
self.ifft = lambda x: fftpack.ifft2(x).astype(x.dtype)
self.fft = lambda x: scipy.fft.fft2(x).astype(x.dtype)
self.ifft = lambda x: scipy.fft.ifft2(x).astype(x.dtype)

def _numpy_fft(self):
self.fft = lambda x: np.ascontiguousarray(np.fft.fft2(x).astype(x.dtype))
Expand Down