def test_addSamples2(self): hist = hogc.Histogram1ff(9, -4.5, 4.5) #add border bin value, this shoud land in the second bin (ie bin indexed 1) hist.addSample(4.5) self.assertEqual(hist.nSamples, 1) histData = hist.hist() for i in range(2, hist.nBins-1): self.assertEqual(histData[i], 0) self.assertEqual(histData[hist.nBins-1], 1) histData[3] = 10 desc = hogc.describeHistogram1ff(hist, verbose=True) print "histogra, desc: ", desc pass
def test_describe(self): hist = hogc.AngleHistogram(9, -4.5, 4.5, hogc.AngleHistogram.ContributionPolicy.One, hogc.AngleHistogram.InterpolationPolicy.YesInterpolation) desc = hogc.describeHistogram1ff(hist, verbose=True) print "histogra, desc: ", desc self.assertTrue(type(desc), type("")) pass