code: def rolling_window(a, lag):
      """
      Convert a into time-lagged vectors
  
      a    : (n, p)
      lag  : time steps used for prediction
  
      returns  (n-lag+1, lag, p)  array
  
      (Building time-lagged vectors is not necessary for neon.)
      """
      assert a.shape[0] > lag
  
      shape = [a.shape[0] - lag + 1, lag, a.shape[-1]]
      strides = [a.strides[0], a.strides[0], a.strides[-1]]
      return np.lib.stride_tricks.as_strided(
          a, shape=shape, strides=strides
      )
  
file_path: neon/examples/timeseries/utils.py
imports: from __future__ import division
  import numpy
  import math
  from neon import NervanaObject
label_desc: Use image node_id 1 for calling a global function with example usage: rolling_window(a, lag) and returns: np