Exemple #1
0
    def setUp(self):
        colon = slice(None)
        masked = True

        self.a = biggus.zeros((3, 2))
        self.b = self.a + self.a

        self.a_nodes = {
            'chunk shape: (3, 2)\nsource key: [:, :]\n'
            '\nuuid_0':
            ('a LazyChunk function', (colon, colon), self.a, masked)
        }
        self.b_nodes = {
            'array ()\n\n(id: uuid_1)': (
                'a LazyChunk function',
                'uuid_0',
                self.b,
                masked,
            )
        }

        self.grp = DaskGroup(None)
Exemple #2
0
 def test_value(self):
     array = zeros(())
     self.assertEqual(array.value, 0)
Exemple #3
0
 def test_shape(self):
     shape = (70, 768, 1024)
     array = zeros(shape)
     self.assertEqual(array.shape, shape)
Exemple #4
0
 def test_dtype_default(self):
     array = zeros(())
     self.assertEqual(array.dtype, np.dtype('f8'))
Exemple #5
0
 def test_dtype(self):
     dtype = 'i2'
     array = zeros((), dtype)
     self.assertIs(array.dtype, np.dtype(dtype))