Ejemplo n.º 1
0
 def test_subtract_means_masked_and_channel_masked(self):
     subtract_means(self.X, [9.25], mask=self.M,
                    channel_mask=self.cm)
     means = get_means(self.X, mask=self.M, channel_mask=self.cm)
     assert_allclose(means, [0.])
     means = get_means(self.X, mask=self.M)
     assert_allclose(means, [8.25, 0.])
Ejemplo n.º 2
0
 def test_subtract_means_masked(self):
     subtract_means(self.X, [8.25, 9.25], mask=self.M)
     means = get_means(self.X, self.M)
     assert_allclose(means, [0., 0.])
     self.assertEqual(self.X[2, 0, 0], 16.)
     self.assertEqual(self.X[2, 0, 1], 17.)
Ejemplo n.º 3
0
 def test_subtract_means_channel_masked(self):
     subtract_means(self.X, [12], channel_mask=self.cm)
     means = get_means(self.X, channel_mask=self.cm)
     assert_allclose(means, [0.])
     means = get_means(self.X)
     assert_allclose(means, [11., 0.])
Ejemplo n.º 4
0
 def test_subtract_means(self):
     subtract_means(self.X, [11, 12])
     means = get_means(self.X)
     assert_allclose(means, [0., 0.])
Ejemplo n.º 5
0
 def test_subtract_means_masked_and_channel_masked(self):
     subtract_means(self.X, [9.25], mask=self.M, channel_mask=self.cm)
     means = get_means(self.X, mask=self.M, channel_mask=self.cm)
     assert_allclose(means, [0.])
     means = get_means(self.X, mask=self.M)
     assert_allclose(means, [8.25, 0.])
Ejemplo n.º 6
0
 def test_subtract_means_channel_masked(self):
     subtract_means(self.X, [12], channel_mask=self.cm)
     means = get_means(self.X, channel_mask=self.cm)
     assert_allclose(means, [0.])
     means = get_means(self.X)
     assert_allclose(means, [11., 0.])
Ejemplo n.º 7
0
 def test_subtract_means_masked(self):
     subtract_means(self.X, [8.25, 9.25], mask=self.M)
     means = get_means(self.X, self.M)
     assert_allclose(means, [0., 0.])
     self.assertEqual(self.X[2, 0, 0], 16.)
     self.assertEqual(self.X[2, 0, 1], 17.)
Ejemplo n.º 8
0
 def test_subtract_means(self):
     subtract_means(self.X, [11, 12])
     means = get_means(self.X)
     assert_allclose(means, [0., 0.])