Commit 7c912416 authored by Theo Steininger's avatar Theo Steininger

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
......@@ -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---
......
......@@ -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):
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)
......
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