Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Fixes faulty determination of chunk sizes #1053

Open
wants to merge 1 commit into
base: cate-4.0.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cate/util/im/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def get_chunk_size(array):
# xarray DataArray with dask, returns the size of each individual tile
chunk_size = array.chunks
if chunk_size:
chunk_size = tuple([c[0] if isinstance(c, tuple) else c for c in chunk_size])
chunk_size = tuple([c[int(len(c)/2)] if isinstance(c, tuple)
else c for c in chunk_size])
except Exception:
pass
if not chunk_size:
Expand Down