def test_check_shapes_other_error(self): with self.assertRaises(ValueError): _check_shapes(self.counts[:3], np.vstack([self.power, self.power]))
def test_check_shapes_too_many_counts(self): with self.assertRaises(ValueError): _check_shapes(np.atleast_2d(self.counts), self.power)
def test_check_shapes_1d_error(self): with self.assertRaises(ValueError): _check_shapes(self.counts[:3], self.power)
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)
def test_check_shapes_1d(self): counts, power = _check_shapes(self.counts, self.power) self.assertEqual(counts.shape, power.shape)