code: def delta(feat, N):
      """Compute delta features from a feature vector sequence.
  
      :param feat: A numpy array of size (NUMFRAMES by number of features) containing features. Each row holds 1 feature vector.
      :param N: For each frame, calculate delta features based on preceding and following N frames
      :returns: A numpy array of size (NUMFRAMES by number of features) containing delta features. Each row holds 1 delta feature vector.
      """
      if N < 1:
          raise ValueError("N must be an integer >= 1")
      NUMFRAMES = len(feat)
      denominator = 2 * sum([i**2 for i in range(1, N + 1)])
      delta_feat = numpy.empty_like(feat)
      padded = numpy.pad(
          feat, ((N, N), (0, 0)), mode="edge"
      )  # padded version of feat
      for t in range(NUMFRAMES):
          delta_feat[t] = (
              numpy.dot(
                  numpy.arange(-N, N + 1), padded[t : t + 2 * N + 1]
              )
              / denominator
          )  # [t : t+2*N+1] == [(N+t)-N : (N+t)+N+1]
      return delta_feat
  
file_path: python_speech_features/python_speech_features/base.py
imports: from __future__ import division
  import numpy
  from python_speech_features import sigproc
  from scipy.fftpack import dct
label_desc: Use image node_id 10 for calling a global function with example usage: delta(feat, N) and returns: delta_feat