-
-
Notifications
You must be signed in to change notification settings - Fork 286
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 iterating over sharding index #2392
Fix iterating over sharding index #2392
Conversation
Is this a bug, or something fundamental to morton coding? |
@d-v-b I wonder if it's worth investigating further how to fix it, or if we just use a simple iteration algorithm like |
I thought the use of the morton ordering was motivated by the desire to place spatially contiguous chunks close together in a shard. The simpler linearization algorithms will not allow this. Maybe it's better to fix the bug in the morton encoding? |
This reverts commit adc3240.
# Conflicts: # tests/v3/test_codecs/test_sharding.py
# Conflicts: # tests/test_codecs/test_sharding.py
@d-v-b |
For some specific shapes of
chunks_per_shard
(e.g.[5,2]
), the current implementation of morton code will produce indices that are not within the shape. Therefore reading the sharding index will drop some chunks.I was wondering if using morton code is a significant efficiency improvement over normal indexing like
np.unravel_index