Skip to content

Commit 1601c53

Browse files
committed
changed arr to arr_lst
1 parent 80bd1f1 commit 1601c53

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pandas/core/arrays/categorical.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -424,13 +424,8 @@ def __init__(
424424
if null_mask.any():
425425
# We remove null values here, then below will re-insert
426426
# 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)
427+
arr_lst = [values[idx] for idx in np.where(~null_mask)[0]]
428+
arr = sanitize_array(arr_lst, None)
434429
values = arr
435430

436431
if dtype.categories is None:

0 commit comments

Comments
 (0)