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 5e07bbb commit 8e80fb9Copy full SHA for 8e80fb9
xarray/core/dataset.py
@@ -293,10 +293,10 @@ def _get_breaks_cached(
293
# Determine the stop indices of the preferred chunks, but omit the last stop
294
# (equal to the dim size). In particular, assume that when a sequence
295
# expresses the preferred chunks, the sequence sums to the size.
296
- preferred_stops = set(
+ preferred_stops = (
297
range(preferred_chunk_sizes, size, preferred_chunk_sizes)
298
if isinstance(preferred_chunk_sizes, int)
299
- else itertools.accumulate(preferred_chunk_sizes[:-1])
+ else set(itertools.accumulate(preferred_chunk_sizes[:-1]))
300
)
301
302
# Gather any stop indices of the specified chunks that are not a stop index
0 commit comments