Exemplo n.º 1
0
 def test_weights_and_returned(self):
     data, weights = SUM.aggregate(self.cube_2d.data,
                                   axis=0,
                                   weights=self.weights,
                                   returned=True)
     self.assertArrayEqual(data, [14, 9, 11, 13, 15])
     self.assertArrayEqual(weights, [4, 2, 2, 2, 2])
Exemplo n.º 2
0
 def test_weights(self):
     data = SUM.aggregate(self.cube_2d.data, axis=0, weights=self.weights)
     self.assertArrayEqual(data, [14, 9, 11, 13, 15])
Exemplo n.º 3
0
 def test_ma(self):
     data = SUM.aggregate(self.cube.data, axis=0)
     self.assertArrayEqual(data, [12])
Exemplo n.º 4
0
 def test_collapse(self):
     data = SUM.aggregate(self.cube.data, axis=0)
     self.assertArrayEqual(data, [15])