Skip to content

Commit

Permalink
only warn and not add compute argument in print
Browse files Browse the repository at this point in the history
  • Loading branch information
ikrommyd committed Sep 18, 2023
1 parent 8e6bb10 commit 522f38b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/coffea/analysis_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ def print(self):
"""Prints the statistics of the N-1 selection"""

if self._delayed_mode:
warnings.warn(
"Printing the N-1 selection statistics is going to compute dask_awkward objects."
)
self._nev = list(dask.compute(*self._nev))

nev = self._nev
Expand Down Expand Up @@ -834,6 +837,9 @@ def print(self):
"""Prints the statistics of the Cutflow"""

if self._delayed_mode:
warnings.warn(
"Printing the cutflow statistics is going to compute dask_awkward objects."
)
self._nevonecut, self._nevcutflow = dask.compute(
self._nevonecut, self._nevcutflow
)
Expand Down

0 comments on commit 522f38b

Please sign in to comment.