-
-
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
Inconsistent ()
indexing/size behavior from v2->v3
#2713
Comments
()
indexing/size behavior from v2->v3()
indexing/size behavior from v2->v3
Thanks @ilan-gold for the report. Looks like we missed the |
I'll take a look at it. regarding your comment in: The semantics of |
Makes sense! |
Do we want to return scalars when accessing zero-dimensional arrays? This would mean that the return value of |
Returning a scalar here would be consistent with numpy (2.2.1): >>> import numpy as np
>>> a = np.array(1)
>>> a
array(1)
>>> a[()]
np.int64(1) |
Zarr version
v3.0.0
Numcodecs version
0.14.1
Python Version
3.12
Operating System
Mac
Installation
uv
Description
Previously something like
z[()]
wherez
is a()
shape array would return a scalar and now returns a one-elem array e.g.,np.array(1)
instead ofnp.float64(1.0)
Steps to reproduce
v3:
v2:
Additional output
No response
The text was updated successfully, but these errors were encountered: