-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Fix a regression with scalar indexing due to #1800 #1875
Fix a regression with scalar indexing due to #1800 #1875
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1875 +/- ##
=======================================
Coverage 99.98% 99.98%
=======================================
Files 38 38
Lines 14667 14695 +28
=======================================
+ Hits 14665 14693 +28
Misses 2 2
|
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.
Thanks Deepak!
@@ -52,6 +52,8 @@ def is_scalar(value, dtype): | |||
return True | |||
if isinstance(value, tuple) and dtype.names and len(value) == len(dtype.names): | |||
return True | |||
if dtype.kind == "O" and not isinstance(value, np.ndarray): |
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.
This is the core issue in #1874. We need to treat [1, 'C']
as a scalar for object arrays.
Is this the right condition?
@zarr-developers/python-core-devs - I'm planning to merge this and make a 2.18.1 release later today. |
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.
Thanks Deepak!
Thanks all! 🙏 |
Fixes a regression in indexing out scalars from size-1 chunks.
TODO: