From 3be1caa4efd1174767e5ef47a8eb1c3459890c07 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 23 Nov 2019 19:21:41 +0100 Subject: [PATCH] read_dataset has at least two dimensions --- python/tests/test_DADF5.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/tests/test_DADF5.py b/python/tests/test_DADF5.py index 6dbd5bef7..c022bd171 100644 --- a/python/tests/test_DADF5.py +++ b/python/tests/test_DADF5.py @@ -51,17 +51,17 @@ class TestDADF5: assert np.allclose(in_memory,in_file) def test_add_determinant(self,default): - default.add_determinant('Lp') - loc = {'Lp': default.get_dataset_location('Lp'), - 'det(Lp)': default.get_dataset_location('det(Lp)')} - in_memory = np.linalg.det(default.read_dataset(loc['Lp'],0)) - in_file = default.read_dataset(loc['det(Lp)'],0) + default.add_determinant('P') + loc = {'P': default.get_dataset_location('P'), + 'det(P)': default.get_dataset_location('det(P)')} + in_memory = np.linalg.det(default.read_dataset(loc['P'],0)).reshape(-1,1) + in_file = default.read_dataset(loc['det(P)'],0) assert np.allclose(in_memory,in_file) def test_add_spherical(self,default): default.add_spherical('P') loc = {'P': default.get_dataset_location('P'), 'p_P': default.get_dataset_location('p_P')} - in_memory = mechanics.spherical_part(default.read_dataset(loc['P'],0)) + in_memory = mechanics.spherical_part(default.read_dataset(loc['P'],0)).reshape(-1,1) in_file = default.read_dataset(loc['p_P'],0) assert np.allclose(in_memory,in_file)