Open MridulS opened 8 months ago
Thanks for the report, confirmed on main. Further investigation and PRs to fix are welcome!
take
As mentioned in #58173, this issue extends beyond the Series constructor. Also Series.to_numpy() has the same issue (only apparent once one fixes the error described in the issue here).
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[X] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
While creating a series object from a masked array of large-ish integers (less than max of
Int64
), the output doesn't match the input. This has probably something to do with float downcast/upcast somewhere.Probably related (?) https://github.com/pandas-dev/pandas/issues/30268, https://github.com/pandas-dev/pandas/pull/50757
Expected Behavior
mx.data - pd.Series(mx, dtype='Int64')
should be all zero with<NA>
for the mask.Installed Versions