You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes deprecation observed in numpy 2.5+ (pre-release):
.venv/lib/python3.13/site-packages/zarr/codecs/vlen_utf8.py:98: in _decode_single
decoded.shape = chunk_spec.shape
^^^^^^^^^^^^^
E DeprecationWarning: Setting the shape on a NumPy array has been deprecated in NumPy 2.5.
E As an alternative, you can create a new view using np.reshape (with copy=False if needed).
❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 60.90%. Comparing base (acdd892) to head (2bc0cbc). ⚠️ Report is 1 commits behind head on main.
@d-v-b Note that this change is not fully backward compatible, if we want it backward compatible we would set copy=False instead of the default copy=None. I consider that copy=None is an enhancement as it will now:
(1) Try to reshape without copy (view)
(2) If it can't, reshape with a copy
If we set copy=False, it will explicitly raise if the view is not possible. Up-to-you, let me know if you think this added fallback mechanism is an enhancement or if hiding this copy is detrimental.
Well it should- and personally I don't see the harm in adding this fallback- but if you prefer to have an explicit raise instead to catch eventual future changes that would somehow yield a non contiguous array of objects, then setting copy=False would be better.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes deprecation observed in
numpy2.5+ (pre-release):