Skip to content

Commit fe84191

Browse files
committed
fix: accum zero
Signed-off-by: Robert Kruszewski <[email protected]>
1 parent c1e07fa commit fe84191

File tree

1 file changed

+1
-1
lines changed
  • vortex-array/src/compute

1 file changed

+1
-1
lines changed

vortex-array/src/compute/sum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl ComputeFnVTable for Sum {
106106
// For floats only use stats if accumulator is zero. otherwise we might have numerical stability issues.
107107
match sum_dtype {
108108
DType::Primitive(p, _) => {
109-
if p.is_float() {
109+
if p.is_float() && accumulator.is_zero() {
110110
return Ok(sum.into());
111111
}
112112
let sum_from_stat = accumulator

0 commit comments

Comments
 (0)