scikit-hep / root_numpy

The interface between ROOT and NumPy

Home Page:http://scikit-hep.org/root_numpy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reading of ROOT vector branches - 1D array inside 1D array

imoric opened this issue · comments

Wondering if it is possible to read vector ROOT branches, 1D arrays of 1D arrays.
root_numpy seems to combine all the second degree 1D arrays inside the first degree 1D array, or am I missing something?

Yes, vector<T> and vector<vector<T> > are supported where T is some primitive type.

vector<T> gives you a column like [[a, b, c], [d, e]]
vector<vector<T> > gives you a column like [[[a, b], [c, d, e, f]], [[g]], [[h, i]]]

Can you show a specific case where root_numpy is giving you something unexpected?

OK, just checked. Feel free to delete the thread.
The issue is with the ROOT file, all the vectors are bunched together.
Thank you!

No problem!