Skip to content

Commit 0cee4b8

Browse files
committed
BUG: Fix mypy typing error
1 parent 1d51941 commit 0cee4b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/construction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,9 @@ def sanitize_masked_array(data: ma.MaskedArray) -> np.ndarray:
525525
inferred_type not in ["floating", "mixed-integer-float"]
526526
and not mask.any()
527527
):
528-
data = np.array(original, dtype=dtype, copy=False)
528+
data = ma.asarray(original, dtype)
529529
else:
530-
data = np.array(original, dtype="object", copy=False)
530+
data = ma.asarray(original, "object")
531531
data[mask] = fill_value
532532
else:
533533
data = data.copy()

0 commit comments

Comments
 (0)