Add missing case for accumulating the mean of attributes that are inconsistently present (#329)

* Add missing case for accumulating the mean of attributes that are inconsistently present

* Add more specific test
This commit is contained in:
Erica Fischer
2025-03-20 14:53:04 -07:00
committed by GitHub
parent a0532e73ac
commit bfb62ee2db
7 changed files with 828 additions and 4 deletions
+5 -2
View File
@@ -162,10 +162,13 @@ static void preserve_attribute1(attribute_op const &op, std::string const &key,
v = val;
break;
case op_count: {
case op_count:
v.set_double_count(1, 1);
break;
}
case op_mean:
v.set_double_count(val.to_double(), 1);
break;
default:
fprintf(stderr, "can't happen: operation that isn't used by --accumulate-numeric-attributes\n");