How to save Numpy array to root file using uproot4

701 views Asked by At

I'm trying to save a large amount of Numpy arrays to a root file using uproot. I've read through the uproot documentation, and as far as I can tell this ability was remove in uproot3. Note I can't save this as a histogram because the order of the data is important (it's a waveform). Does anyone know of a work around, or thing I'm missing to do this?

e.g: I want something like this

'''

import numpy as np
import uproot as up

array = np.random.normal(0,1,1000)
file = up.recreate('./test.root')
file['Tree1'] = array

'''

0

There are 0 answers