Compute rolling windows of width ``size`` of the given array.

        Return a numpy 2D stride array,
        where rows are the windows, each of ``size`` elements.

        :param array: the data array
        :type  array: numpy 1D array (n)
        :param int size: the width of each window
        :rtype: numpy 2D stride array (n // size, size)

def _rolling_window(self, array, size):
        """
        Compute rolling windows of width ``size`` of the given array.

        Return a numpy 2D stride array,
        where rows are the windows, each of ``size`` elements.

        :param array: the data array
        :type  array: numpy 1D array (n)
        :param int size: the width of each window
        :rtype: numpy 2D stride array (n // size, size)
        """
        shape = array.shape[:-1] + (array.shape[-1] - size + 1, size)
        strides = array.strides + (array.strides[-1],)
        return numpy.lib.stride_tricks.as_strided(array, shape=shape, strides=strides)