Skip to content

Commit

Permalink
Fix uninitialized warning
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Jan 8, 2025
1 parent 63a4d19 commit dd4f4ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pandas/_libs/hashtable_func_helper.pxi.in
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ cdef value_count_{{dtype}}(const {{dtype}}_t[:] values, bint dropna, const uint8
result_counts[i] = table.vals[k]

if na_counter > 0:
assert n > 0 # val will be uninitialized without this
result_counts[table.size] = na_counter
result_keys.append(val)

Expand Down

0 comments on commit dd4f4ac

Please sign in to comment.