| 842 | |
| 843 | @unittest.skipUnless(HAVE_NUMPY, "requires build with numpy-support") |
| 844 | def test_numpy_conversion_4(self): |
| 845 | a = histogram(integer(0, 2, uoflow=False), |
| 846 | integer(0, 4, uoflow=False)) |
| 847 | a1 = numpy.asarray(a) |
| 848 | self.assertEqual(a1.dtype, numpy.uint8) |
| 849 | self.assertEqual(a1.shape, (2, 4)) |
| 850 | |
| 851 | b = histogram() |
| 852 | b1 = numpy.asarray(b) |
| 853 | self.assertEqual(b1.shape, (0,)) |
| 854 | self.assertEqual(numpy.sum(b1), 0) |
| 855 | |
| 856 | @unittest.skipUnless(HAVE_NUMPY, "requires build with numpy-support") |
| 857 | def test_numpy_conversion_5(self): |