File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -536,10 +536,10 @@ def window_statistic(
536
536
537
537
chunk_offsets = _sizes_to_start_offsets (windows_per_chunk )
538
538
539
- def blockwise_moving_stat (x : ArrayLike , block_info : Any = None ) -> ArrayLike :
540
- if block_info is None or len ( block_info ) == 0 :
539
+ def blockwise_moving_stat (x : ArrayLike , block_id : Any = None ) -> ArrayLike :
540
+ if block_id is None :
541
541
return np .array ([])
542
- chunk_number = block_info [ 0 ][ "chunk-location" ] [0 ]
542
+ chunk_number = block_id [0 ]
543
543
chunk_offset_start = chunk_offsets [chunk_number ]
544
544
chunk_offset_stop = chunk_offsets [chunk_number + 1 ]
545
545
chunk_window_starts = rel_window_starts [chunk_offset_start :chunk_offset_stop ]
@@ -559,8 +559,9 @@ def blockwise_moving_stat(x: ArrayLike, block_info: Any = None) -> ArrayLike:
559
559
depth = {0 : depth }
560
560
# new chunks are same except in first axis
561
561
new_chunks = tuple ([tuple (windows_per_chunk )] + list (desired_chunks [1 :])) # type: ignore
562
- return values .map_overlap (
562
+ return da .map_overlap (
563
563
blockwise_moving_stat ,
564
+ values ,
564
565
dtype = dtype ,
565
566
chunks = new_chunks ,
566
567
depth = depth ,
You can’t perform that action at this time.
0 commit comments