Newbie
June 17, 2020, 6:29pm
1
Dear,
I’m trying to get the quantile value for 60%, and here is what I’m doing
h = ROOT.TH1F(“h”,“demo quantiles”,100,-3,3)
h.FillRandom(“gaus”,5000)
prob=np.array([0.6])
q=np.array([0.])
print h.GetQuantiles(1,q,prob)
But this is returning 1, regardless of what my histogram is, am I doing something wrong?
many thanks!
Newbie
June 22, 2020, 11:02pm
3
Hi! I based my example on it, but I still don’t know how to compute a single value.
My example is not working, is there anything wrong there?
Thanks
The documentation Wile linked says that the return value of GetQuantiles is a single integer, the number of quantiles computed
. In your example you want to print q (and maybe prob).
Newbie
June 23, 2020, 11:14am
5
Thanks a lot! I thought that the function gives the quantile(s), but now it’s clear!