MCPcopy Create free account
hub / github.com/boostorg/histogram / test_numpy_conversion_4

Method test_numpy_conversion_4

test/python_suite_test.py:844–854  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 2

integerClass · 0.90
histogramClass · 0.50

Tested by

no test coverage detected