Skip to content

Commit

Permalink
Revert "warn in print() when user is about to compute dask stuff"
Browse files Browse the repository at this point in the history
This reverts commit 3bdff8c.
  • Loading branch information
ikrommyd committed Sep 18, 2023
1 parent 3bdff8c commit 8e6bb10
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/coffea/analysis_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,16 +582,10 @@ def to_npz(self, file, compressed=False, compute=False):
else:
return out

def print(self, compute=False):
def print(self):
"""Prints the statistics of the N-1 selection"""

if self._delayed_mode and not compute:
warnings.warn(
"This will compute dask_awkward arrays. If you really want to do this now, call print(compute=True)"
)
return

if self._delayed_mode and compute:
if self._delayed_mode:
self._nev = list(dask.compute(*self._nev))

nev = self._nev
Expand Down Expand Up @@ -836,16 +830,10 @@ def to_npz(self, file, compressed=False, compute=False):
else:
return out

def print(self, compute=False):
def print(self):
"""Prints the statistics of the Cutflow"""

if self._delayed_mode and not compute:
warnings.warn(
"This will compute dask_awkward arrays. If you really want to do this now, call print(compute=True)"
)
return

if self._delayed_mode and compute:
if self._delayed_mode:
self._nevonecut, self._nevcutflow = dask.compute(
self._nevonecut, self._nevcutflow
)
Expand Down

0 comments on commit 8e6bb10

Please sign in to comment.