-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Implement interpolation for arrow and masked dtypes #56757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
@pytest.mark.parametrize( | ||
"dtype", | ||
["int64", "uint64", "int32", "int16", "int8", "uint32", "uint16", "uint8"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any_int_numpy_dtype
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are also passing in int, which screws with the logic below, I think handling this specifically causes more complexity than simply keeping the explicit list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay. Sure this is fine for now then
def test_interpolate_ea_raise(self): | ||
@pytest.mark.parametrize( | ||
"dtype", | ||
["Int64", "UInt64", "Int32", "Int16", "Int8", "UInt32", "UInt16", "UInt8"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any_int_ea_dtype
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx added
if self.dtype.kind == "f": | ||
data = self._pa_array.to_numpy() | ||
elif self.dtype.kind in "iu": | ||
data = self.to_numpy(dtype="f8", na_value=0.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To confirm, the na_value
doesn't matter here because of the mask
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes correct
Thanks @phofl |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
…56757) * ENH: Implement interpolation for arrow and masked dtypes * Fixup * Fix typing * Update
.interpolate()
Method Incompatible withfloat[pyarrow]
Dtype #56267 (Replace xxxx with the GitHub issue number)doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.