def test_distance_array_serial_results(self): result = np.empty((self.coord[0].shape[0], self.coord[0].shape[0])).astype(np.float32) cython_parallel = distance_array_serial(self.coord[0], self.coord[1], result=result) assert_allclose(cython_parallel, self.ref, rtol=1e-6, atol=1e-6, err_msg="Cython parallel distance matrix does not match C")
def test_distance_array_serial_pbc(self): cython_parallel = distance_array_serial(self.coord[0], self.coord[1], box=self.box) assert_allclose(cython_parallel, self.ref_pbc, rtol=1e-6, atol=1e-6, err_msg="Cython parallel distance matrix does not match C")
def test_distance_array_serial(self): coord = self.coord cython_serial = distance_array_serial(self.coord[0], self.coord[1]) assert_allclose(cython_serial, self.ref, rtol=1e-6, atol=1e-6, err_msg="Cython serial distance matrix does not match C")