windowed

fun <T, D : Dimension> MultiArray<T, D>.windowed(    size: Int,     step: Int = 1,     limit: Boolean = true): NDArray<T, D2>

Returns a 2-D ndarray of window segments of the specified size, sliding over this ndarray with the specified step.

The last few arrays are filled with zeros if limit is false. The size and step must be positive and can be greater than the number of elements in this ndarray.

Parameters

size

the size and step must be positive and can be greater than the number of elements in this array

step

the number of elements to move the window forward by on an each step, by default 1

limit

sets a limit on the set of significant elements in the result, otherwise it fills in with zeros