Pointer in python i.e TH1::SetError


i’m trying to change a TH1 error bars using the SetError method.in python
The input of this method should be an array of const Double_t (const Double_t *error)

i tried several method to make it works :
** Notpl.SetError(err)
where err was a regular python list filled with float, a python list filled with ROOT.Double numbers,
an python array, but nothing was correct, it always gave me
File “Stange_errors.py”, line 139, in
TypeError: void TH1::SetError(const Double_t* error) =>
could not convert argument 1

any idea of how to use this method ?
thanks in advance


use an array from module array instead of a list. ROOT.Double is only for passing through a non-const reference to double, lists can not be passed at all. The reason that array works is that it has an accessible, underlying C structure, whereas list does not.