-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BLD: Suppressing errors while compling pandas/_libs/groupby #32794
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
BLD: Suppressing errors while compling pandas/_libs/groupby #32794
Conversation
pandas/_libs/groupby.pyx
Outdated
if not len(values) == len(labels): | ||
# NOTE: | ||
# Casting to avoid build warnings | ||
if not len(values) == <Py_ssize_t>len(labels): |
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.
Is it possible to get the same result without casting? Maybe labels.shape[0] for memory views?
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.
@WillAyd It works!
Just so I know for future times, are we trying to avoid casting?
or casting is not possible with memory views?
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.
If there's an easily available approach that doesn't require casting then should almost always go that route
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.
lgtm if green - @jbrockmendel
LGTM. Might want to open an issue with cython; i think in theory these are supposed to be equivalent |
Looks like also part of 3.0 release
cython/cython#2992
…Sent from my iPhone
On Mar 17, 2020, at 6:16 PM, jbrockmendel ***@***.***> wrote:
LGTM. Might want to open an issue with cython; i think in theory these are supposed to be equivalent
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
That's great! In ea678f0 I have added "TODO" notes, to revert this code change. |
thanks @MomIsBestFriend |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
This are the errors that this PR is getting rid of: