我正在尝试从根目录加载希格斯玻色子数据集。我不习惯使用 uproot 和 .root 数据类型。我正在使用以下代码,这是一种加载库的官方说明。我已经制作了一个虚拟环境并安装了必要的库
import oamap.source.root
import uproot
events = uproot.open("http://scikit-hep.org/uproot/examples/HZZ.root")["events"].oamap()
运行上述示例代码时出现以下错误。
Traceback (most recent call last):
File "main.py", line 4, in <module>
events = uproot.open("http://scikit-hep.org/uproot/examples/HZZ.root")["events"].oamap()
File "/home/akash/DIANAhep/lib/python3.5/site-packages/oamap/source/root.py", line 187, in __call__
generator = self.schema.generator()
File "/home/akash/DIANAhep/lib/python3.5/site-packages/oamap/source/root.py", line 184, in schema
return oamap.schema.List(recurse(self.tree), starts="", stops="")
File "/home/akash/DIANAhep/lib/python3.5/site-packages/oamap/source/root.py", line 138, in recurse
x = frominterp(name, branch, uproot.interp.auto.interpret(branch))
File "/home/akash/DIANAhep/lib/python3.5/site-packages/oamap/source/root.py", line 100, in frominterp
return oamap.schema.Primitive(interpretation.todtype, data=name)
File "/home/akash/DIANAhep/lib/python3.5/site-packages/oamap/schema.py", line 346, in __init__
self.data = data
File "/home/akash/DIANAhep/lib/python3.5/site-packages/oamap/schema.py", line 418, in data
raise TypeError("data must be None or an array name (string), not {0}".format(repr(value)))
TypeError: data must be None or an array name (string), not b'NJet'
我是这类加载数据集的新手。