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
0-dimensional ndarrays should support len
#7281
Comments
It does not report a |
Or maybe not. I just thought the second example was odd. If it has a size, doesn't that sort of mean it has a length? |
It makes sense, on second thought. But then why does |
Another way to think about it: |
This |
I guess this can be closed, or is there still something to discuss here @gerritholl? |
When asking for
len(X)
on a 0-d ndarray, aTypeError
is raised because the object is reportedly unsized. This despiteX.size
being equal to 1. IfX
were unsized, it wouldn't have a '.size' attribute?Interestingly, a
void
does acceptlen
:The text was updated successfully, but these errors were encountered: