Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Cythonized GroupBy Quantile #20405
Cythonized GroupBy Quantile #20405
Changes from 30 commits
618ec99
74871d8
7b6ca68
31aff03
4a43815
eb18823
813da81
e152dd5
7a8fefb
b4938ba
3f7d0a9
d7aec3f
e712946
72cd30e
a3c4b11
ac96526
7d439d8
3047eed
70bf89a
02eb336
7c3c349
3b9c7c4
ad8b184
b846bc2
93b122c
09308d4
1a718f2
ff062bd
bdb5089
9b55fb5
31e66fc
41a734f
67e0f00
07b0c00
86aeb4a
86b9d8d
cfa1b45
00085d0
1f02532
3c64c1f
09695f5
68cfed9
4ce1448
5e840da
7969fb6
f9a8317
464a831
4b3f9be
b996e1d
cdd8985
64f46a3
4d88e8a
1cd93dd
9ae23c1
eb99f07
94d4892
0512f37
2370129
a018570
f41cd05
21691bb
082aea3
dc5877a
7496a9b
ec013bf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This check was throwing a build warning as the lhs was returning size_t whereas
len(labels)
was returningPy_ssize_t
(eventually replaced with N since that was duplicative).Not sure why
len
would have returned two different types though. May be a difference betweenndarray
andnumeric
@jbrockmendel
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.
A difference between ndarray and memoryview is plausible. IIRC cython suggests using
arr.shape[0]
instead oflen(arr)
for memoryviews because the former is done wholly in C-space while the latter makes a python call. I could imagine that being related to this, but am really just guessing.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.
Good call - using shape had the same effect as the cast though seems more idiomatic. Looks like I have some windows failures to look at but will push that up along with it. Good to know for future reference as well
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.
this is pretty janky I would change to do this
basically returning the state (or an empty dict) in the pre and passing it to the post
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.
you will have to adjust the other callers of this but shouldn't be a big deal
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.
use is_object_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.
I think your issue is this check - on windows np.int is 32 bit, and is probably too strict anyways. Use
is_integer_dtype
insteadThere 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.
side note this file is getting pretty big, maybe should split it up a bit (later)