Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
87793f67
Commit
87793f67
authored
Sep 14, 2017
by
Martin Reinecke
Browse files
performance tweak
parent
1c203090
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty2go/operators/fft_operator/fft_operator_support.py
View file @
87793f67
...
...
@@ -54,7 +54,7 @@ class RGRGTransformation(Transformation):
for
i
in
axes
[:
-
1
]:
slice1
[
i
]
=
slice
(
1
,
None
)
slice2
[
i
]
=
slice
(
None
,
0
,
-
1
)
res
[
slice1
]
=
tmp
[
slice2
].
real
-
tmp
[
slice2
].
imag
np
.
subtract
(
tmp
[
slice2
].
real
,
tmp
[
slice2
].
imag
,
out
=
res
[
slice1
])
for
i
,
ax
in
enumerate
(
axes
[:
-
1
]):
dim1
=
[
slice
(
None
)]
*
ax
+
[
slice
(
0
,
1
)]
axes2
=
axes
[:
i
]
+
axes
[
i
+
1
:]
...
...
@@ -79,7 +79,7 @@ class RGRGTransformation(Transformation):
ntmplast
=
tmp
.
shape
[
lastaxis
]
nrem
=
nlast
-
ntmplast
slice1
=
[
slice
(
None
)]
*
lastaxis
+
[
slice
(
0
,
ntmplast
)]
res
[
slice1
]
=
tmp
.
real
+
tmp
.
imag
np
.
add
(
tmp
.
real
,
tmp
.
imag
,
out
=
res
[
slice1
])
RGRGTransformation
.
_fill_upper_half
(
tmp
,
res
,
axes
)
return
res
...
...
Write
Preview
Supports
Markdown
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