Commit ea9b75ba authored by Theo Steininger's avatar Theo Steininger

Fixed RGSpace Tests

parent 8d2916d7
Pipeline #16547 failed with stages
in 5 minutes and 21 seconds
...@@ -27,6 +27,7 @@ from numpy.testing import assert_, assert_equal, assert_almost_equal ...@@ -27,6 +27,7 @@ from numpy.testing import assert_, assert_equal, assert_almost_equal
from nifty import RGSpace from nifty import RGSpace
from test.common import expand from test.common import expand
from itertools import product from itertools import product
from nose.plugins.skip import SkipTest
# [shape, zerocenter, distances, harmonic, expected] # [shape, zerocenter, distances, harmonic, expected]
CONSTRUCTOR_CONFIGS = [ CONSTRUCTOR_CONFIGS = [
...@@ -158,7 +159,10 @@ class RGSpaceFunctionalityTests(unittest.TestCase): ...@@ -158,7 +159,10 @@ class RGSpaceFunctionalityTests(unittest.TestCase):
(4, 6, 8), (17, 5, 3)], (4, 6, 8), (17, 5, 3)],
[True, False])) [True, False]))
def test_hermitianize_inverter(self, shape, zerocenter): def test_hermitianize_inverter(self, shape, zerocenter):
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 = distributed_data_object(global_shape=shape, dtype=np.complex128)
v[:] = np.random.random(shape) + 1j*np.random.random(shape) v[:] = np.random.random(shape) + 1j*np.random.random(shape)
inverted = r.hermitianize_inverter(v, axes=range(len(shape))) inverted = r.hermitianize_inverter(v, axes=range(len(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