We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da64366 commit e33d2bbCopy full SHA for e33d2bb
src/mdio/converters/segy.py
@@ -509,9 +509,11 @@ def _calculate_live_mask_chunksize(grid: Grid) -> Sequence[int] | int:
509
Either a single integer (-1) if no chunking is needed, or a sequence of integers
510
representing the optimal chunk size for each dimension of the grid.
511
"""
512
+ # Use nbytes for the initial check, since we are limited by Blosc's maximum
513
+ # chunk size in bytes.
514
if grid.live_mask.nbytes < INT32_MAX:
515
# Base case where we don't need to chunk the live mask
- return -1
516
+ return grid.live_mask.shape
517
518
# Calculate the optimal chunksize for the live mask
519
total_elements = np.prod(grid.shape[:-1]) # Exclude sample dimension
0 commit comments