Skip to content

CLN explicit casts to float to avoid implicit casts #50540

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

Merged
merged 2 commits into from
Jan 4, 2023

Conversation

MarcoGorelli
Copy link
Member

Similar to #50493

There are places when an implicit cast happens, but it's not the purpose of the test - the cast might as well be done explicitly then

This would help pave the way towards PDEP6

@@ -54,6 +54,8 @@ def seed_df(seed_nans, n, m):
"3rd": np.random.randint(1, m + 1, n),
}
)
# Explicitly cast to float to avoid implicit cast when setting nan
frame["3rd"] = frame["3rd"].astype("float")
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be needed only if this hits if seed_nans?

Copy link
Member Author

Choose a reason for hiding this comment

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

you're right, thanks!

@mroeschke mroeschke added this to the 2.0 milestone Jan 4, 2023
@mroeschke mroeschke merged commit 2da7128 into pandas-dev:main Jan 4, 2023
@mroeschke
Copy link
Member

Thanks @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.

2 participants