Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
85cd0445
Commit
85cd0445
authored
Jul 18, 2017
by
Theo Steininger
Browse files
Fixed test in rg_transforms.py MPIFFT
parent
d475ed86
Pipeline
#15057
canceled with stage
in 1 minute and 11 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
nifty/operators/fft_operator/transformations/rg_transforms.py
View file @
85cd0445
...
...
@@ -373,10 +373,16 @@ class MPIFFT(Transform):
original_shape
=
inp
.
shape
inp
=
inp
.
reshape
(
inp
.
shape
[
0
],
1
)
axes
=
(
0
,
)
if
original_shape
[
0
]
%
2
!=
0
:
raise
AttributeError
(
"MPI-FFTs of onedimensional arrays "
"with odd length are currently not supported due to a "
"bug in FFTW. Please use a grid with even length."
)
if
axes
is
None
:
global_shape
=
val
.
shape
else
:
global_shape
=
(
val
.
shape
[
axes
[
0
]],
)
if
global_shape
[
0
]
%
2
!=
0
:
raise
AttributeError
(
"MPI-FFTs of onedimensional arrays with odd length "
"are currently not supported due to a bug in FFTW. "
"Please use a grid with even length."
)
if
current_info
is
None
:
transform_shape
=
list
(
inp
.
shape
)
...
...
test/test_operators/test_fft_operator.py
View file @
85cd0445
...
...
@@ -63,7 +63,7 @@ class FFTOperatorTests(unittest.TestCase):
assert_equal
(
res
[
zc1
*
(
dim1
//
2
),
zc2
*
(
dim2
//
2
)],
0.
)
@
expand
(
product
([
"numpy"
,
"fftw"
,
"fftw_mpi"
],
[
1
2
,
],
[
False
,
True
],
[
False
,
True
],
[
1
6
,
],
[
False
,
True
],
[
False
,
True
],
[
0.1
,
1
,
3.7
],
[
np
.
float64
,
np
.
complex128
,
np
.
float32
,
np
.
complex64
]))
def
test_fft1D
(
self
,
module
,
dim1
,
zc1
,
zc2
,
d
,
itp
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment