code: def rollingSum(data, n):
      d1 = data.copy()
      d1[1:] += d1[:-1]  # integrate
      d2 = np.empty(len(d1) - n + 1, dtype=data.dtype)
      d2[0] = d1[n - 1]  # copy first point
      d2[1:] = d1[n:] - d1[:-n]  # subtract
      return d2
  
file_path: pyqtgraph/pyqtgraph/flowchart/library/functions.py
imports: import numpy
  from ...metaarray import MetaArray
label_desc: Use image node_id 5 for calling a global function with example usage: rollingSum(data, n) and returns: d2