In the "Basic file I/O with Uproot" chapter, in the "Writing TTrees" section, you show two ways to create/write trees.
However, their "x" branches will be different.
This creates an "x/L" branch:
output1["tree1"] = {"x": np.random.randint(0, 10, 1000000), "y": np.random.normal(0, 1, 1000000)}
This creates an "x/I" branch:
output1.mktree("tree2", {"x": np.int32, "y": np.float64})
Maybe it would be a good idea to use:
output1.mktree("tree2", {"x": np.int64, "y": np.float64})
BTW. You do not tell people to execute output1.close() in the end.
In the "
Basic file I/O with Uproot" chapter, in the "Writing TTrees" section, you show two ways to create/write trees.However, their
"x"branches will be different.This creates an
"x/L"branch:output1["tree1"] = {"x": np.random.randint(0, 10, 1000000), "y": np.random.normal(0, 1, 1000000)}This creates an
"x/I"branch:output1.mktree("tree2", {"x": np.int32, "y": np.float64})Maybe it would be a good idea to use:
output1.mktree("tree2", {"x": np.int64, "y": np.float64})BTW. You do not tell people to execute
output1.close()in the end.