Keith Sloan <ke...@sloan-home.co.uk> writes: > Thanks > > Okay trying to understand the data being returned. > I have > > counts, bins = np.histogram(RedEllipticalMasses['Z_1'],bins=80) > > If I print lengths I get > RedEllipticalMasses is 2514 > bins = 81 > and counts is 5 > ( It is 5 Arrays each of length 80) > > Okay I can get centers with > centers = 0.5 * (bins[1:] + bins[:-1] > > As you advised > But unclear how I would get their heights and why counts has 5 arrays ? >
Not having a clear understanding of your dataset.. I'm not quit sure why you're seeing the results you described. Nevertheless if you define bins with an integer, the len(counts) should be equal to that number and len bins should indeed be that number + 1. Perhaps you have a mistake somewhere else in your code? _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion