Esempio n. 1
0
    def testAround(self):
        t1 = ones((2, 3), dtype='f4', chunks=2)

        t = around(t1, decimals=3)

        self.assertEqual(t.op.decimals, 3)

        t.tiles()

        self.assertEqual(t.chunks[0].op.decimals, 3)
Esempio n. 2
0
    def testAround(self):
        t1 = ones((2, 3), dtype='f4', chunk_size=2)

        t = around(t1, decimals=3)

        self.assertEqual(t.op.decimals, 3)
        self.assertEqual(calc_shape(t), t.shape)

        t.tiles()

        self.assertEqual(t.chunks[0].op.decimals, 3)
        self.assertEqual(calc_shape(t.chunks[0]), t.chunks[0].shape)