-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Consider the following code:
import dask.array as da
import numpy as np
d = da.arange(8, chunks=4)
g = d.map_overlap(np.mean, depth=0, boundary=0, trim=False, keepdims=True)After computing g, this will return the mean of the two chunks [0:4] and [4:8]. Currently, there seems to be no way to specify a step size different (smaller) than the chunk size for each dimension. One could want a step size of 2, result in the mean for ranges [0:4], [2:6], [4:8].
Being able to specify a step size is very useful for filtering images, for example, as the user may be fine with computing every the filter for only every second or third pixel to reduce compute time. The user may want an arbitrary step size, which I think will normally be anything from 1..len(chunk[dim]).
I would be interesting in knowing what options do we currently have (if any), otherwise, what people think may be a good direction for the implementation of a step size.