Skip to content

Commit

Permalink
Merge pull request #839 from CoffeaTeam/mltools-doc-cleanup
Browse files Browse the repository at this point in the history
fix: remove now-incorrect documentation from ml_tools
  • Loading branch information
lgray committed Jun 14, 2023
2 parents df5291e + f6db357 commit b8b7f20
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/coffea/ml_tools/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,26 +188,6 @@ def prepare_awkward(self, *args, **kwargs) -> Tuple:
Consult the following documentation to find the awkward operations
needed.
https://awkward-array.org/doc/main/user-guide/how-to-restructure-pad.html
If you need to use numpy-only operations like np.column_stack, remember to use
awkward.typetracer.length_zero_if_typetracer(arg) before calling .to_numpy().
Furthermore you should convert back into a typetracer in these situations.
Otherwise, when running with dask_awkward, you will run into problems.
length_zero_if_typetracer and typetracer handling example:
def prepare_prepare_awkward(self, events):
ret = np.column_stack(
[
ak.typetracer.length_zero_if_typetracer(events[name])
for name in feature_list
]
)
ret = ak.Array(ret, behavior=events.behavior)
if ak.backend(events) == "typetracer":
ret = ak.Array(
ret.layout.to_typetracer(forget_length=True), behavior=ret.behavior
)
return [], dict(data=ret)
"""
pass

Expand Down

0 comments on commit b8b7f20

Please sign in to comment.