Maybe I am missing some obvious initialisation, but, please consider the following code:
import ROOT ROOT.gROOT.ProcessLine("vector<double> *v = new vector<double>();") #ROOT.v+=np.array([1.,2.,3.]) v1 = ROOT.vector("double") ROOT.v+=np.array([1.,2.,3.]) print(ROOT.v)
It the commented line is uncommented, I get the NotImplementedError on it. However, initialising another vector directly from PyROOT seems to fix this error, and += operation on the vector created in C++ starts to work. Is it a bug, or am I missing something here?
I just want to store numpy arrays in vectors in a C++ class, thus I need += operator working on those vectors.
ROOT Version: 6.22.06
Platform: Fedora 33
Compiler: Not Provided