-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
Return scalar when accessing zero dimensional array #2718
base: main
Are you sure you want to change the base?
Return scalar when accessing zero dimensional array #2718
Conversation
Do we want to return scalars when accessing zero-dimensional arrays? This would mean that the return value of |
To copy what numpy does (see #2713 (comment)), I think we do want to return a scalar. |
@d-v-b what do you think about |
# Conflicts: # src/zarr/api/synchronous.py
()
indexing/size behavior from v2->v3 #27130-dimensional arrays are now returning a scalar. Therefore, the return type of
__getitem__
changedto NDArrayOrScalarLike. This change is to make the behavior of 0-dimensional arrays consistent with
numpy
scalars.TODO:
docs/user-guide/*.rst
changes/