Skip to content

Commit d847f47

Browse files
audersonauderson
auderson
authored andcommitted
add check for inf, if inf, mark as not same
1 parent 037303e commit d847f47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/_libs/window/aggregations.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ cdef inline void add_var(float64_t val, float64_t *nobs, float64_t *mean_x,
310310
nobs[0] = nobs[0] + 1
311311

312312
# GH#42064, record num of same values to remove floating point artifacts
313-
if val == prev_value[0] and val != np.inf and val != np.NINF:
313+
if val == prev_value[0]:
314314
num_consecutive_same_value[0] += 1
315315
else:
316316
# reset to 1 (include current value itself)

0 commit comments

Comments
 (0)