How to pass pointers to functions in PyROOT?

I’m trying to get TGraph contours from a TH2 histogram with PyROOT, and in order to do that I’m just trying to convert this ROOT script to PyROOT:
root.cern.ch/root/html/tutorial … ist.C.html

But I’m having problems with this section:

[code]Double_t contours[6];
contours[0] = -0.7;
contours[1] = -0.5;
contours[2] = -0.1;
contours[3] = 0.1;
contours[4] = 0.4;
contours[5] = 0.8;

HistStreamFn->SetContour(6, contours);[/code]

However, this won’t work:

contours = [10, 100] HistStreamFn.SetContour(2, contours)

I imagine that’s because the function requires a pointer, but how do I pass that in python?

1 Like

My apologies, a simple numpy.array sufficed.