Skip to content

Commit

Permalink
Start implementing lazy arrays. (#45)
Browse files Browse the repository at this point in the history
* Start implementing lazy arrays.

* Introduce a separate batch of libraries for lazy arrays.

* All awkward_form functions need a configurable index_format.

* Complete lazy array example.

* Dask works.

* 'arrays' on a branch with no subbranches returns an array-group of just that branch.

* ak.Array.dtype behavior comes from Dask.

* dask.dataframe is good enough for now.
  • Loading branch information
jpivarski authored Jul 9, 2020
1 parent 7d61301 commit b48e338
Show file tree
Hide file tree
Showing 22 changed files with 1,024 additions and 251 deletions.
88 changes: 44 additions & 44 deletions tests/test_0034-generic-objects-in-ttrees.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ def test_general_awkward_form():
"size": 10
},
"Beg": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "uint8",
"parameters": {
"__array__": "string",
Expand All @@ -389,8 +389,8 @@ def test_general_awkward_form():
}
},
"End": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "uint8",
"parameters": {
"__array__": "string",
Expand Down Expand Up @@ -419,8 +419,8 @@ def test_general_awkward_form():
}
},
"SliceF32": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "float32",
"parameters": {
"uproot": {
Expand All @@ -430,8 +430,8 @@ def test_general_awkward_form():
}
},
"SliceF64": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "float64",
"parameters": {
"uproot": {
Expand All @@ -441,8 +441,8 @@ def test_general_awkward_form():
}
},
"SliceI16": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "int16",
"parameters": {
"uproot": {
Expand All @@ -452,8 +452,8 @@ def test_general_awkward_form():
}
},
"SliceI32": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "int32",
"parameters": {
"uproot": {
Expand All @@ -463,8 +463,8 @@ def test_general_awkward_form():
}
},
"SliceI64": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "int64",
"parameters": {
"uproot": {
Expand All @@ -474,8 +474,8 @@ def test_general_awkward_form():
}
},
"SliceU16": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "uint16",
"parameters": {
"uproot": {
Expand All @@ -485,8 +485,8 @@ def test_general_awkward_form():
}
},
"SliceU32": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "uint32",
"parameters": {
"uproot": {
Expand All @@ -496,8 +496,8 @@ def test_general_awkward_form():
}
},
"SliceU64": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "uint64",
"parameters": {
"uproot": {
Expand All @@ -507,8 +507,8 @@ def test_general_awkward_form():
}
},
"StdStr": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "uint8",
"parameters": {
"__array__": "string",
Expand All @@ -520,8 +520,8 @@ def test_general_awkward_form():
}
},
"StlVecF32": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "float32",
"parameters": {
"uproot": {
Expand All @@ -531,8 +531,8 @@ def test_general_awkward_form():
}
},
"StlVecF64": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "float64",
"parameters": {
"uproot": {
Expand All @@ -542,8 +542,8 @@ def test_general_awkward_form():
}
},
"StlVecI16": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "int16",
"parameters": {
"uproot": {
Expand All @@ -553,8 +553,8 @@ def test_general_awkward_form():
}
},
"StlVecI32": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "int32",
"parameters": {
"uproot": {
Expand All @@ -564,8 +564,8 @@ def test_general_awkward_form():
}
},
"StlVecI64": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "int64",
"parameters": {
"uproot": {
Expand All @@ -575,11 +575,11 @@ def test_general_awkward_form():
}
},
"StlVecStr": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "uint8",
"parameters": {
"__array__": "string",
Expand All @@ -598,8 +598,8 @@ def test_general_awkward_form():
}
},
"StlVecU16": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "uint16",
"parameters": {
"uproot": {
Expand All @@ -609,8 +609,8 @@ def test_general_awkward_form():
}
},
"StlVecU32": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "uint32",
"parameters": {
"uproot": {
Expand All @@ -620,8 +620,8 @@ def test_general_awkward_form():
}
},
"StlVecU64": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "uint64",
"parameters": {
"uproot": {
Expand All @@ -631,8 +631,8 @@ def test_general_awkward_form():
}
},
"Str": {
"class": "ListOffsetArray32",
"offsets": "i32",
"class": "ListOffsetArray64",
"offsets": "i64",
"content": "uint8",
"parameters": {
"__array__": "string",
Expand Down
Loading

0 comments on commit b48e338

Please sign in to comment.