Skip to content

Commit

Permalink
rename data
Browse files Browse the repository at this point in the history
  • Loading branch information
natmokval committed May 6, 2023
1 parent 6a18b99 commit 533d841
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pandas/core/construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,12 +502,12 @@ def sanitize_masked_array(data: ma.MaskedArray) -> np.ndarray:
if mask.any():
dtype, fill_value = maybe_promote(data.dtype, np.nan)
dtype = cast(np.dtype, dtype)
data = ma.asarray(data.astype(dtype, copy=True))
data.soften_mask() # set hardmask False if it was True
data[mask] = fill_value
sanitized_ma = data.astype(dtype, copy=True)
sanitized_ma.soften_mask() # set hardmask False if it was True
sanitized_ma[mask] = fill_value
return sanitized_ma
else:
data = data.copy()
return data
return data.copy()


def sanitize_array(
Expand Down

0 comments on commit 533d841

Please sign in to comment.