-
Notifications
You must be signed in to change notification settings - Fork 158
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
Support numpy size() and array.size #1777
Conversation
This is ready. |
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! This PR is good to merge.
Since we are doing it, in a new PR can you also please add a test like:
from numpy import size
a = empty((2, 3))
assert size(a) == 2*3
assert size(a, 0) == 2
assert size(a, 1) == 3
It will probably already work, but just in case. I usually use the size
function like this, just like in Fortran.
Sure, thank you for the guidance. It seems the backends expect dimension value to start from |
fixes #1773