Skip to content
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

CLN: avoid upcasting in tests where unnecessary (PDEP-6 precursor) #53104

Merged
merged 2 commits into from
May 5, 2023

Conversation

MarcoGorelli
Copy link
Member

another precursor to PDEP6, similar to #52957

turns out there were even more of these which could be factored upon further inspection

@@ -328,15 +328,14 @@ def test_where_bug_mixed(self, any_signed_int_numpy_dtype):
)

expected = DataFrame(
{"a": [np.nan, np.nan, 3.0, 4.0], "b": [4.0, 3.0, np.nan, np.nan]},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing this test to fill with -1 instead of with nan

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just checking: you looked at the original issue and confirmed this still tests the relevant bug?

Copy link
Member Author

@MarcoGorelli MarcoGorelli May 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah the original issue is just about having mixed dtypes #2793 , I've preserved that but have just updated the fill value to one which won't upcast


I think I'm scraping the barrel here with these precursors, there's probably not much more to factor out which doesn't intentionally test upcasting behaviour

@MarcoGorelli MarcoGorelli requested review from jbrockmendel and phofl May 5, 2023 17:21
@mroeschke mroeschke added this to the 2.1 milestone May 5, 2023
@mroeschke mroeschke merged commit 14e7c4a into pandas-dev:main May 5, 2023
@mroeschke
Copy link
Member

Thanks @MarcoGorelli

@MarcoGorelli MarcoGorelli requested a review from mroeschke May 5, 2023 21:28
topper-123 pushed a commit to topper-123/pandas that referenced this pull request May 7, 2023
…andas-dev#53104)

* remove more upcasts

* 🎨

---------

Co-authored-by: MarcoGorelli <>
Rylie-W pushed a commit to Rylie-W/pandas that referenced this pull request May 19, 2023
…andas-dev#53104)

* remove more upcasts

* 🎨

---------

Co-authored-by: MarcoGorelli <>
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
…andas-dev#53104)

* remove more upcasts

* 🎨

---------

Co-authored-by: MarcoGorelli <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants