Commit 2b070f69 authored by theos's avatar theos
Browse files

Code deduplication.

parent 06e2d7fa
......@@ -449,16 +449,16 @@ class FFTWTransformInfo(object):
if pyfftw is None:
raise ImportError("The module pyfftw is needed but not available.")
self.cmask_domain = fftw_context.get_centering_mask(
domain.zerocenter,
local_shape if axes is None else
[y for x, y in enumerate(local_shape) if x in axes],
shape = (local_shape if axes is None else
[y for x, y in enumerate(local_shape) if x in axes])
self.cmask_domain = fftw_context.get_centering_mask(domain.zerocenter,
shape,
local_offset_Q)
self.cmask_codomain = fftw_context.get_centering_mask(
codomain.zerocenter,
local_shape if axes is None else
[y for x, y in enumerate(local_shape) if x in axes],
shape,
local_offset_Q)
# If both domain and codomain are zero-centered the result,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment