def test_reflect_wrong_symmetry_plane_3(self):
     params = FFD([3, 2, 2])
     params.read_parameters('tests/test_datasets/parameters_sphere.prm')
     params.array_mu_z = np.array(
         [0.2, 0., 0., 0., 0.5, 0., 0., 0., 1., 0., 0.3, 0.1]).reshape(
             (3, 2, 2))
     with self.assertRaises(RuntimeError):
         params.reflect(axis=2)
 def test_reflect_axis_2(self):
     params = FFD([3, 2, 2])
     params.read_parameters('tests/test_datasets/parameters_sphere.prm')
     params.array_mu_z = np.array(
         [0.2, 0., 0., 0., 0.5, 0., 0., 0., 0., 0., 0., 0.]).reshape(
             (3, 2, 2))
     params.reflect(axis=2)
     array_mu_z_exact = np.array([
         0.2, 0., -0.2, 0., 0., 0., 0.5, 0., -0.5, 0., 0., -0., 0., 0., -0.,
         0., 0., -0.
     ]).reshape((3, 2, 3))
     np.testing.assert_array_almost_equal(params.array_mu_z,
                                          array_mu_z_exact)