filtered[s["fname"]].append(-1)
return filtered
+def greps(what="time", grep_all=False):
+ """Return the dictionary of ``fname``'s and corresponding list of values.
+
+ If ``what`` not present, use ``-1`` instead.
+
+ Keyword arguments:
+ what -- What to filter.
+ grep_all -- Add ``-1`` if ``what`` not in scenario.
+ """
+ filtered = {}
+ scenarios = load_multidir(DNAME)
+ for s in scenarios:
+ if s["fname"] not in filtered:
+ filtered[s["fname"]] = {}
+ if what in s:
+ filtered[s["fname"]][int(s["subdname"])] = s[what]
+ return filtered
+
def error_rate():
"""Return the dictionary of ``fname``'s and corresponding error rates."""
f = grep("cost", True)