Maybe someone had already treated this issue, but I’m new and with a quick search I don’t’ find nothing related… So, sorry if I’m a repeater…
I’ve found that PyROOT has problem to understand this kind of variables in the classes. Practical example:
a = TAxis(3, [1., 2., 3.])
or
b = [1., 2., 3.]
a = TAxis(3, b)
he doesn’t recognize the second argument as an array (that in C++ is declared as “const double *something”).
Someone knows how to give an array as argument in this case?
yes, the C++ side expects an array as a contiguous piece of memory. A python list is a list of pointers to python objects that wrap those doubles. An array from python module array would work as well. For numpy, make sure that the array is flat.