We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80bd1f1 commit 1601c53Copy full SHA for 1601c53
pandas/core/arrays/categorical.py
@@ -424,13 +424,8 @@ def __init__(
424
if null_mask.any():
425
# We remove null values here, then below will re-insert
426
# them, grep "full_codes"
427
-
428
- # error: Incompatible types in assignment (expression has type
429
- # "List[Any]", variable has type "ExtensionArray")
430
- arr = [ # type: ignore[assignment]
431
- values[idx] for idx in np.where(~null_mask)[0]
432
- ]
433
- arr = sanitize_array(arr, None)
+ arr_lst = [values[idx] for idx in np.where(~null_mask)[0]]
+ arr = sanitize_array(arr_lst, None)
434
values = arr
435
436
if dtype.categories is None:
0 commit comments