Skip to content
GitLab
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
7c912416
Commit
7c912416
authored
Aug 15, 2017
by
Theo Steininger
Browse files
Merge branch 'master' into real_fft_really_integrated
# Conflicts: # test/test_spaces/test_rg_space.py
parents
e01b0ed4
ea9b75ba
Pipeline
#16549
failed with stage
in 6 minutes and 51 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/spaces/rg_space/rg_space.py
View file @
7c912416
...
...
@@ -333,6 +333,8 @@ class RGSpace(Space):
def
_parse_zerocenter
(
self
,
zerocenter
):
temp
=
np
.
empty
(
len
(
self
.
shape
),
dtype
=
bool
)
temp
[:]
=
zerocenter
if
np
.
any
(
np
.
logical_and
(
temp
,
np
.
array
(
self
.
shape
)
%
2
)):
raise
ValueError
(
"All zerocentered axis must have even length!"
)
return
tuple
(
temp
)
# ---Serialization---
...
...
test/test_spaces/test_rg_space.py
View file @
7c912416
...
...
@@ -28,6 +28,7 @@ from numpy.testing import assert_, assert_equal, assert_almost_equal, \
from
nifty
import
RGSpace
,
nifty_configuration
from
test.common
import
expand
from
itertools
import
product
from
nose.plugins.skip
import
SkipTest
# [shape, zerocenter, distances, harmonic, expected]
CONSTRUCTOR_CONFIGS
=
[
...
...
@@ -160,7 +161,10 @@ class RGSpaceFunctionalityTests(unittest.TestCase):
[
True
,
False
],
[
'real'
,
'complex'
]))
def
test_hermitianize_inverter
(
self
,
shape
,
zerocenter
,
base
):
r
=
RGSpace
(
shape
,
harmonic
=
True
,
zerocenter
=
zerocenter
)
try
:
r
=
RGSpace
(
shape
,
harmonic
=
True
,
zerocenter
=
zerocenter
)
except
ValueError
:
raise
SkipTest
v
=
distributed_data_object
(
global_shape
=
shape
,
dtype
=
np
.
complex128
)
v
[:]
=
np
.
random
.
random
(
shape
)
+
1j
*
np
.
random
.
random
(
shape
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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