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.
PERF: block-wise arithmetic for frame-with-frame #32779
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
PERF: block-wise arithmetic for frame-with-frame #32779
Changes from 5 commits
1697252
a7764d6
30a836d
3559698
4334353
cb40b0c
713a776
95ef3ad
61e5cd6
89c3d7b
e348e46
519c757
2b1ba18
53e93fc
91c86a3
2034084
8aedf35
0c12d35
9727562
6661dd3
42bbbf3
65ab023
0d958a3
7f91e74
56eef51
4baea6f
41a4e7a
b23144e
7f24d57
ae744b7
b14a98c
f42c403
8a2807e
fa046f0
fd10fb6
7ea5d3a
7150e87
bddfbb0
25f83d6
2142d29
0ca2125
1ea0cc0
2bfc308
d5ad2a0
108004b
7ca5f9a
e78570d
33dfbdf
30f655b
65a4eaf
30d6580
fe21f9c
f86deb4
f3dc465
b57f52c
0c46531
463a145
32e70d8
7989251
455e45e
41e8e78
ac8eea8
8c4f951
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.
ok much nicer / readable that before. I would consider moving this to a new module to de-nest these functions for blockwise operations (e.g. pandas/core/ops/blockwise.py), but can be later.
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 if you move this to ops/blockwise.py would be a +1
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.
would really like to put this in a new file
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.
might be more clear to make for example this section (368 to 374) as a function
so the structure of what you are doing is more clear.
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.
can you add some comments here.(general + line comments as needed)
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.
An alternative would be to improve the performance of this line, and avoid the complexity that is added in
operate_blockwise
.It will not give the same performance boost as what you now have with the blockwise operation, but it might already be a nice speedup with much less complex code, so a trade-off to consider IMO.
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.
regardless this is worth doing on L343/424 and L348/429
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.
What warning are we suppressing here, and is this future-proof? If this is the usual
then in the future the result will be
array([False, False])
. Is that what we want?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 warning-catching was necessary to make the npdev build, pass, im going to see if i can revert it
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.
looks like catching this is needed in some form, but i can move the catching so as to cast a less-wide net.
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.
Do you know why this changed? We do / do not raise a warning on the array-level?
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 don't do a warning when operating
op(arr, length_1_object_array)
, which turns out to be the cases described here (in reverse)