def test_result_type(): x = tensor([2, 3], dtype='i4') y = 3 z = np.array([3, 4], dtype='f4') r = result_type(x, y, z) e = np.result_type(x.dtype, y, z) assert r == e
def testResultType(self): x = tensor([2, 3], dtype='i4') y = 3 z = np.array([3, 4], dtype='f4') r = result_type(x, y, z) e = np.result_type(x.dtype, y, z) self.assertEqual(r, e)