I am trying to figure out how to get the statistics of a 2d histogram.
stats = (0.,1.,2.,3.,4.,5.,6.)
gives error message "TypeError: void TH2::GetStats(Stat_t* stats) => could not convert argument 1
If anybody could help ?
With normal CINT or C++, this is absolutly trivial, just do
Since you post this question in the Python thread, I assume that the problem
is with the python interface. In this case, Wim will process your mail
a tuple can not act as a placeholder like a C++ builtin array can, because it is immutable as per the python language reference. Instead, do simply:
from array import array
stats = array( 'd', 7*[0.] ) # creates a mutable buffer of 7 doubles
h.GetStats ( stats )