We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d305a8 commit 5199911Copy full SHA for 5199911
util/analyze/utils.py
@@ -74,6 +74,15 @@ def zipped_keep_blocks_if(*logs, pred):
74
except TypeError:
75
old_pred = pred
76
pred = lambda *blks: all(old_pred(b) for b in blks)
77
+ except StopIteration:
78
+ # There was nothing in zip(*logs)...
79
+ old_pred = pred
80
+ def new_pred(*blks):
81
+ try:
82
+ return old_pred(*blks)
83
+ except TypeError:
84
+ return all(old_pred(b) for b in blks)
85
+ pred = new_pred
86
87
def zip_benchmarks_if(*benchmarks):
88
# (A[a], A[a]) -> [(a, a)] or []
0 commit comments