Exemplo n.º 1
0
 def test_check_shapes_other_error(self):
     with self.assertRaises(ValueError):
         _check_shapes(self.counts[:3], np.vstack([self.power, self.power]))
Exemplo n.º 2
0
 def test_check_shapes_too_many_counts(self):
     with self.assertRaises(ValueError):
         _check_shapes(np.atleast_2d(self.counts), self.power)
Exemplo n.º 3
0
 def test_check_shapes_1d_error(self):
     with self.assertRaises(ValueError):
         _check_shapes(self.counts[:3], self.power)
Exemplo n.º 4
0
 def test_check_shapes_2d(self):
     counts, power = _check_shapes(self.counts,
                                   np.vstack([self.power, self.power]))
     self.assertEqual(counts.shape, power.shape)
     self.assertEqual(len(power.shape), 1)
Exemplo n.º 5
0
 def test_check_shapes_1d(self):
     counts, power = _check_shapes(self.counts, self.power)
     self.assertEqual(counts.shape, power.shape)
Exemplo n.º 6
0
 def test_check_shapes_other_error(self):
     with self.assertRaises(ValueError):
         _check_shapes(self.counts[:3], np.vstack([self.power, self.power]))
Exemplo n.º 7
0
 def test_check_shapes_1d_error(self):
     with self.assertRaises(ValueError):
         _check_shapes(self.counts[:3], self.power)
Exemplo n.º 8
0
 def test_check_shapes_too_many_counts(self):
     with self.assertRaises(ValueError):
         _check_shapes(np.atleast_2d(self.counts), self.power)
Exemplo n.º 9
0
 def test_check_shapes_1d(self):
     counts, power = _check_shapes(self.counts, self.power)
     self.assertEqual(counts.shape, power.shape)
Exemplo n.º 10
0
 def test_check_shapes_2d(self):
     counts, power = _check_shapes(self.counts,
                                   np.vstack([self.power, self.power]))
     self.assertEqual(counts.shape, power.shape)
     self.assertEqual(len(power.shape), 1)