Oct-30-2019, 02:57 PM
Hi all,
I used numpy to bin some data with following simple code:
0.0->11356
5.7143->68
11.4286->18
17.1429->8
22.8572->3
28.5715->2
34.2858->1
40.0001->1
45.7144->6
51.4287->3
I would like to have all values more spread, so that the 0.0-5.7 bin would be split into smaller bins.
Which approach are you guys taking here? Should I look into other statistical packages?
In fact I would need bins that vary in size, but I still need the same number of bins. As far as I see, this couldn't be done with numpy.
Rgds,
M.
I used numpy to bin some data with following simple code:
a = np.array(data) histo = np.histogram(a,bins=nbrbins)But the results look like this (left = bin, right = number of samples)
0.0->11356
5.7143->68
11.4286->18
17.1429->8
22.8572->3
28.5715->2
34.2858->1
40.0001->1
45.7144->6
51.4287->3
I would like to have all values more spread, so that the 0.0-5.7 bin would be split into smaller bins.
Which approach are you guys taking here? Should I look into other statistical packages?
In fact I would need bins that vary in size, but I still need the same number of bins. As far as I see, this couldn't be done with numpy.
Rgds,
M.