Esempio n. 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)
Esempio n. 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)
Esempio n. 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)