-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
add conditional to check ndim
#63058
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
base: main
Are you sure you want to change the base?
Conversation
|
Please review this. |
|
Does this PR address an open issue? |
Not any issue which I know of. But, I thought that it should raise an error. So, I made the PR. |
|
Sorry for being pedantic about this, but since this is a change in behavior, I think it's best to:
|
I will do what you said. But, I am still learning. I do not know to create tests. Please help me with that. |
|
Issue created for this PR #63112 |
|
I think that |
I will do that. Should I make a new PR for that? |
It should be done in this one. |
Thank you for helping. I will create the tests. |
|
pre-commit failed because the max characters allowed in a line exceeded. I did not know about the max allowed characters. Sorry for that. |
Description
It checks the value of
ndimwhen the argument fordatais annp.ndarrayinpandas.array(data, dtype=None, copy=True)Reason
Raises an error because the array is 2-D
Does not raise an error in this case(maybe, because the value is now a string). But, it should raise an error as only 1-D arrays can be passed as arguments.
resolves #63112