Beispiel #1
0
 def XtestBinSize(self):
     # FIXME: doesn't work
     h = Histogram([-1.0, 1.0], binSize=1)
     h.dump(sys.stdout)
     bins = h.build()
     self.assertEqual(self.__getBinsInfo(bins),
                          [(0, -2.0, 0.0, 2.0, 1, 0.0),
                           (1, 0.0, 2.0, 2.0, 1, 0.0)])
Beispiel #2
0
 def testNumBins(self):
     h = Histogram([-1.0, 1.0], numBins=2)
     bins = h.build()
     self.assertEqual(self.__getBinsInfo(bins),
                          [(0, -2.0, 0.0, 2.0, 1, 0.0),
                           (1, 0.0, 2.0, 2.0, 1, 0.0)])