def test_IsInf3D_3(self): np_a = np.reshape(self.np_a, (4, 2, 3)) dc_a = dc.reshape(self.dc_a, (4, 2, 3)) npr = Isinf(np_a, self.detect_positive, self.detect_negative) dcr = dc.isinf(dc_a, self.detect_positive, self.detect_negative) np.testing.assert_array_equal(npr.flatten(), np.array(dcr.data()))
def test_IsInf4D(self): np_a = np.reshape(self.np_a, (2, 2, 2, 3)) dc_a = dc.reshape(self.dc_a, (2, 2, 2, 3)) npr = np.isinf(np_a) dcr = dc.isinf(dc_a) np.testing.assert_array_equal(npr.flatten(), np.array(dcr.data()))
def test_IsInf1D(self): npr = Isinf(self.np_a, self.detect_positive, self.detect_negative) dcr = dc.isinf(self.dc_a, self.detect_positive, self.detect_negative) np.testing.assert_array_equal(npr, np.array(dcr.data()))
def test_IsInf1D(self): npr = np.isinf(self.np_a) dcr = dc.isinf(self.dc_a, 1, 1) np.testing.assert_array_equal(npr, np.array(dcr.data()))