Index: tools/eval_gc_nvp.py |
diff --git a/tools/eval_gc_nvp.py b/tools/eval_gc_nvp.py |
index af131f182fc52f71b8b741c43bcba05d60b3bf06..fcb6d8b9a2232ff24b04709d9520df0bd0b61755 100755 |
--- a/tools/eval_gc_nvp.py |
+++ b/tools/eval_gc_nvp.py |
@@ -97,6 +97,9 @@ class Category: |
return 0.0 |
return sum(self.values) / len(self.values) |
+ def empty(self): |
+ return len(self.values) == 0 |
+ |
def __str__(self): |
if self.csv: |
ret = [self.key] |
@@ -179,6 +182,9 @@ def main(): |
for category in categories: |
category.process_entry(obj) |
+ # Filter out empty categories. |
+ categories = [x for x in categories if not x.empty()] |
+ |
if args.rank != "no": |
categories = sorted(categories, key=make_key_func(args.rank), reverse=True) |