def test_Erf4D (self): np_a = np.reshape(self.np_a, (2,2,2,3)) dc_a = dc.reshape(self.dc_a, (2,2,2,3)) npr = temp_erf(np_a) dcr = dc.erf(dc_a) np.testing.assert_allclose(npr.flatten(), np.array(dcr.data()).astype(np.float32), rtol=1e-3, atol=1e-3)
def test_Erf1D(self): npr = temp_erf(self.np_a) dcr = dc.erf(self.dc_a) np.testing.assert_allclose(npr, np.array(dcr.data()).astype(np.float32), rtol=1e-3, atol=1e-3)
def test_Erf2D_double_1(self): np_double_a = np.reshape(self.np_double_a, (3, 16)) dc_double_a = dc.reshape(self.dc_double_a, (3, 16)) npr = temp_erf(np_double_a) dcr = dc.erf(dc_double_a) np.testing.assert_allclose(npr.flatten(), np.array(dcr.data()).astype(np.float64), rtol=1e-3, atol=1e-3)