-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
changed shape argument for ndarray from int to tuple in ./core/strings/object_array.py #44352
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
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
64cc2f4
changed shape argument for ndarray fro int to tuple
nickleus27 0fd3c66
changed variable hashed to combined_hashed in dtype.py
nickleus27 c3e784f
pre-commit changes
nickleus27 5404817
changed cat_array assignment to cat_array_list
nickleus27 986c7c3
changed Dtype to npt.DTypeLike
nickleus27 1f45e22
Merge branch 'master' into nicks_typ_err
nickleus27 bacef8a
deleted Dtype import
nickleus27 7d53eb8
Merge branch 'nicks_typ_err' of https://github.com/nickleus27/pandas …
nickleus27 862bc8d
changed dtype: NpDtype
nickleus27 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
best guess is this is intended to use np.array, not np.ndarray
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.
@jbrockmendel Thank you! I am new to this and appreciate the help. So you think calling np.array with similar arguments is needed instead of np.ndarray?
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.
@jbrockmendel also, I tried using pd.test() on my local machine and I didn't get this error message. Any advice on how to test before i push again?
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.
it should probably be
np.array([], dtype=dtype)
.Are you referring to the 'Argument 1 to "ndarray" ...'? That would show up if you a) removed the "type: ignore[arg-type]" and then ran 'mypy pandas'
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.
@jbrockmendel awesome, thank you! I will try this out.
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.
@jbrockmendel I am having trouble figuring out how to address the type errors for argument dtype. The suggestion you made about np.array instead of np.ndarray didn't solve the problem. Should I close this pr if I cannot figure it out?
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 am going to close this pull request for now. I am going to research the problem further, and come back to this once I have a good working solution. Thank you for helping me get started.
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 went wrong with
np.array([], dtype=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.
same type error as with the np.ndarray
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 it is a similar error but now complaining about the dtype rather than the first arg
this might be fixed by changing the annotaiton for 'dtype' from
Dtype | None
toNpDtype | None
; @simonjayhawkins may know more than me about the intention here.