Skip to content

Commit e55b3ee

Browse files
committed
remove ignore[assignment] from pandas/core/construction.py
1 parent 103d3b2 commit e55b3ee

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/core/construction.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,7 @@ def sanitize_masked_array(data: ma.MaskedArray) -> np.ndarray:
496496
if mask.any():
497497
dtype, fill_value = maybe_promote(data.dtype, np.nan)
498498
dtype = cast(np.dtype, dtype)
499-
# Incompatible types in assignment (expression has type "ndarray[Any,
500-
# dtype[Any]]", variable has type "MaskedArray[Any, Any]")
501-
data = data.astype(dtype, copy=True) # type: ignore[assignment]
499+
data = ma.asarray(data.astype(dtype, copy=True))
502500
data.soften_mask() # set hardmask False if it was True
503501
data[mask] = fill_value
504502
else:

0 commit comments

Comments
 (0)