-
-
Notifications
You must be signed in to change notification settings - Fork 304
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. |
…ing' into return-scalar-for-zero-dim-indexing
What do you think of the |
# Conflicts: # tests/test_array.py
()
indexing/size behavior from v2->v3 #27130-dimensional arrays are now returning an instance of
ScalarWrapper
, which behaves like a scalarbut follow the
NDArrayLike
interface. This change is to make the behavior of 0-dimensional arraysconsistent with
numpy
scalars while not breaking the output format of theNDArrayLike
interface.TODO:
docs/user-guide/*.rst
changes/