There is a newer version of the record available.

Published September 21, 2018 | Version 3.0.2
Software Open

scikit-hep/uproot: 3.0.2

  • 1. DIANA-HEP
  • 2. Texas A&M University
  • 3. RWTH Aachen

Description

Write Numpy histograms to ROOT files:

import uproot
import numpy
f = uproot.recreate("some.root")
f["myhist"] = numpy.histogram(numpy.random.normal(0, 1, 10000)) + ("optional title",)
f["myhist"].show()

import ROOT
f2 = ROOT.TFile("some.root")
h2 = f2.Get("myhist")
h2.Draw()

Numpy's irregular binning is also supported.

Files

scikit-hep/uproot-3.0.2.zip

Files (54.5 MB)

Name Size Download all
md5:b8bf8fe286e82490d636f530936e37c1
54.5 MB Preview Download

Additional details

Related works