def testEqInPlaceWithNumber(self): t1 = TensorBase(np.arange(5)) t1.eq_(1) self.assertEqual(t1, [False, True, False, False, False])
def test_eq_in_place_with_number(self): t1 = TensorBase(np.arange(5)) t1.eq_(1) self.assertEqual(t1, [False, True, False, False, False])
def testEqInPlaceWithTensor(self): t1 = TensorBase(np.arange(5)) t2 = TensorBase(np.arange(5)[-1::-1]) t1.eq_(t2) self.assertEqual(t1, [False, False, True, False, False])
def test_eq_in_place_with_tensor(self): t1 = TensorBase(np.arange(5)) t2 = TensorBase(np.arange(5)[-1::-1]) t1.eq_(t2) self.assertEqual(t1, [False, False, True, False, False])