GH1727 Narrow Series.to_numpy return types based on the dtype argument#1736
Open
loicdiridollou wants to merge 7 commits into
Open
GH1727 Narrow Series.to_numpy return types based on the dtype argument#1736loicdiridollou wants to merge 7 commits into
loicdiridollou wants to merge 7 commits into
Conversation
loicdiridollou
commented
May 8, 2026
| **kwargs: Any, | ||
| ) -> np_1darray_object: ... | ||
| @overload | ||
| def to_numpy( |
Member
Author
There was a problem hiding this comment.
Not totally sure if this one is really in the spirit of the stubs since we have all the other np_1darray_xxx but thought it was worth offering since once we do the to_numpy it goes into the numpy ground.
cmp0xff
requested changes
May 10, 2026
cmp0xff
reviewed
May 11, 2026
cmp0xff
requested changes
May 11, 2026
cmp0xff
requested changes
May 13, 2026
Contributor
cmp0xff
left a comment
There was a problem hiding this comment.
In my example in #1727 (comment), np.dtypes.Float64DType() and np.dtypes.Float64DType etc should also work. Currently they are missing from the tests.
Member
Author
|
Added a lot more tests to fit, let me know what you think! |
f738964 to
7456364
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
assert_type()to assert the type of any return value)AGENTS.md.Added the following deprecation: