Skip to content

Commit 89113c5

Browse files
audersonauderson
authored and
auderson
committed
add check for inf, if inf, mark as not same
1 parent 57534b6 commit 89113c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/_numba/kernels/var_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def add_var(
2121
) -> tuple[int, float, float, float, int, float]:
2222
if not np.isnan(val):
2323

24-
if val == prev_value:
24+
if val == prev_value and not np.isinf(val):
2525
num_consecutive_same_value += 1
2626
else:
2727
num_consecutive_same_value = 1

0 commit comments

Comments
 (0)