def test_innerproduct(): a = 2450.0 b = np.array([430, 452, 474, 500, 526, 552, 570, 600, 630]) c = np.array([[1,2,3], [4,5,6], [7,8,9], [10,11,12]]) d = np.array([[13,14,15], [16,17,18], [19,20,21], [22,23,24]]) e = np.zeros(9,dtype = np.float64) g = qcp.InnerProduct(e, c.astype(np.float64), d.astype(np.float64), 4, None) assert_almost_equal(a, g) assert_array_almost_equal(b, e)
def test_innerproduct(atoms_a, atoms_b): a = 2450.0 b = np.array([430, 452, 474, 500, 526, 552, 570, 600, 630]) number_of_atoms = 4 e = np.zeros(9, dtype=np.float64) g = qcp.InnerProduct(e, atoms_a, atoms_b, number_of_atoms, None) assert_almost_equal(a, g) assert_array_almost_equal(b, e)