def testCos(self): t1 = tensor([[0, 1, 0], [1, 0, 0]], chunk_size=2).tosparse() t = cos(t1) self.assertFalse(t.issparse()) self.assertIs(type(t), Tensor) self.assertEqual(calc_shape(t), t.shape)
def testCos(self): t1 = tensor([[0, 1, 0], [1, 0, 0]], chunks=2).tosparse() t = cos(t1) self.assertFalse(t.issparse()) self.assertIs(type(t), Tensor)
def testCos(self): t1 = tensor([[0, 1, 0], [1, 0, 0]], chunk_size=2).tosparse() t = cos(t1) self.assertTrue(t.issparse()) self.assertIs(type(t), SparseTensor)