Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
Add test for Jagged arrays of type Boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
reikdas committed May 1, 2020
1 parent f0bb00f commit a1ed12f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,24 @@ def test_jagged_uproot_i4(tmp_path):
for j in range(len(array[i])):
assert(array[i][j] == a[i][j])

#Unable to read back in ROOT
def test_jagged_uproot_bool(tmp_path):
filename = join(str(tmp_path), "example.root")

a = awkward.fromiter([[0],
[1, 0],
[1, 1, 0]])

with uproot.recreate(filename, compression=None) as f:
f["t"] = uproot.newtree({"branch": uproot.newbranch(numpy.dtype(">?"), dependence="n")})
f["t"].extend({"branch": a, "n": [1, 2, 3]})

f = uproot.open(filename)
array = f["t"].array(["branch"])
for i in range(len(array)):
for j in range(len(array[i])):
assert(array[i][j] == a[i][j])

def test_jagged_i8(tmp_path):
filename = join(str(tmp_path), "example.root")

Expand Down

0 comments on commit a1ed12f

Please sign in to comment.