data = np.pad(data, [(0, 0), padding], **kwargs)
history = np.vstack([np.roll(data, -i * delay, axis=1) for i in range(n_steps)[::-1]])
// Trim to original width
if delay > 0:
history = history[:, :t]
else:
history = history[:, -t:]
// Make contiguous
After Change
shape = list(data.shape)
shape[0] = shape[0] * n_steps
shape[1] = t
shape = tuple(shape)
// Construct the output array to match layout and dtype of input
history = np.empty_like(data, shape=shape)
// Populate the output array
__stack(history, data, n_steps, delay)