Example #1
0
    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)
Example #2
0
    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)
Example #3
0
    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)