uproot can now write TTrees containing baskets with flat data!
Example -
import uproot
filename = "example.root"
b = uproot.newbranch(">i4", compression=uproot.LZMA(3))
branchdict = {"intBranch": b}
tree = uproot.newtree(branchdict)
a = [1, 2, 3, 4, 5]
with uproot.recreate(filename, compression=uproot.ZLIB(4)) as f:
f["t"] = tree
f["t"]["intBranch"].newbasket(a)