-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Add missing shape
parameter to numpy methods
#1450
Conversation
shape
parameter of numpy.zeros_like
me…shape
parameter of numpy.zeros_like
@mbyrnepr2 👍 |
@DanielNoord sure thing. I am less familiar with astroid code so I will take a look at the test structure for this hopefully later today. If you can give me any pointers I would appreciate. |
I'm on mobile so I can't look up code easily right now. |
Great that's good to know, will try it out later @DanielNoord |
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.
Thank you for your First astroid contribution @mbyrnepr2 ;)
Adding another item here should work. |
Thanks @cdce8p! I was looking at this one earlier. It seems that the tests will pass with or without adding the parameter to this line; but that seems to be the structure for much of the numpy tests that I've seen. |
Thanks for the warm welcome, nice to be here! |
for more information, see https://pre-commit.ci
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.
Change itself looks good to me!
- Fixup imports - More accurate unittest naming - Use typehints
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.
Added some last changes in aeb1bf8. Looks good now!
Although not strictly necessary as astroid can't infer numpy natively anyway, I added the >1.17.0
requirement. According to the docs, that's where shape
was added.
https://numpy.org/doc/stable/reference/generated/numpy.zeros_like.html
Thank you for this @cdce8p! |
shape
parameter of numpy.zeros_like
shape
parameter to numpy methods
And it's merged. Congrats on your first astroid contribution @mbyrnepr2 🚀 |
Add the missing
shape
parameter to the brain for:Steps
Description
Type of Changes
Related Issue
Closes with relevant test pylint-dev/pylint#5871