Skip to content

Commit 5404817

Browse files
committed
changed cat_array assignment to cat_array_list
1 parent c3e784f commit 5404817

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/core/dtypes/dtypes.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,11 @@ def _hash_categories(self) -> int:
465465
[cat_array, np.arange(len(cat_array), dtype=cat_array.dtype)]
466466
)
467467
else:
468-
# error: Incompatible types in assignment (expression has type
469-
# "List[ndarray]", variable has type "ndarray")
470-
cat_array = [cat_array] # type: ignore[assignment]
468+
cat_array_list = [cat_array]
469+
combined_hashed = combine_hash_arrays(
470+
iter(cat_array_list), num_items=len(cat_array_list)
471+
)
472+
return np.bitwise_xor.reduce(combined_hashed)
471473
combined_hashed = combine_hash_arrays(iter(cat_array), num_items=len(cat_array))
472474
return np.bitwise_xor.reduce(combined_hashed)
473475

0 commit comments

Comments
 (0)