We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3e784f commit 5404817Copy full SHA for 5404817
pandas/core/dtypes/dtypes.py
@@ -465,9 +465,11 @@ def _hash_categories(self) -> int:
465
[cat_array, np.arange(len(cat_array), dtype=cat_array.dtype)]
466
)
467
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]
+ cat_array_list = [cat_array]
+ combined_hashed = combine_hash_arrays(
+ iter(cat_array_list), num_items=len(cat_array_list)
471
+ )
472
+ return np.bitwise_xor.reduce(combined_hashed)
473
combined_hashed = combine_hash_arrays(iter(cat_array), num_items=len(cat_array))
474
return np.bitwise_xor.reduce(combined_hashed)
475
0 commit comments