Skip to content

CLN: Use more memoryviews #58330

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
Apr 22, 2024
Merged

Conversation

mroeschke
Copy link
Member

No description provided.

@mroeschke mroeschke requested a review from WillAyd as a code owner April 19, 2024 20:04
@@ -80,7 +80,7 @@ def unstack(numeric_object_t[:, :] values, const uint8_t[:] mask,

@cython.wraparound(False)
@cython.boundscheck(False)
def explode(ndarray[object] values):
Copy link
Member

Choose a reason for hiding this comment

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

can we get here with a readonly ndarray?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like in our testing this array is always writable (from mgr.internal_values()), should this be readonly?

Copy link
Member

Choose a reason for hiding this comment

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

I think it can depend on what user passed to the constructor

Copy link
Member Author

Choose a reason for hiding this comment

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

Gotcha. Well specifically here, we can't use const as that's not supported with object memoryviews

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm

@mroeschke mroeschke added this to the 3.0 milestone Apr 22, 2024
@mroeschke mroeschke merged commit 3461db5 into pandas-dev:main Apr 22, 2024
49 of 50 checks passed
@mroeschke mroeschke deleted the ref/memoryviews branch April 22, 2024 17:56
kvnwng11 pushed a commit to kvnwng11/pandas that referenced this pull request Apr 22, 2024
* Add memoryviews in reshape.pyx

* Use more const memoryviews
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
* Add memoryviews in reshape.pyx

* Use more const memoryviews
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