code: def test_1d(self):
      buffer = BufferProcessor(5, init=np.zeros(5))
      self.assertTrue(np.allclose(buffer.data, 0))
      # shift in two new values
      result = buffer(np.arange(2))
      self.assertTrue(np.allclose(result, [0, 0, 0, 0, 1]))
      result = buffer(np.arange(2, 4))
      self.assertTrue(np.allclose(result, [0, 0, 1, 2, 3]))
      result = buffer(np.arange(4, 6))
      self.assertTrue(np.allclose(result, [1, 2, 3, 4, 5]))
      # shift in three new values
      result = buffer(np.arange(6, 9))
      self.assertTrue(np.allclose(result, [4, 5, 6, 7, 8]))
      # shift in six new values (bigger than buffer)
      result = buffer(np.arange(9, 15))
      self.assertTrue(np.allclose(result, [10, 11, 12, 13, 14]))
  
file_path: madmom/tests/test_processors.py
imports: from __future__ import absolute_import, division, print_function
  import tempfile
  import unittest
  from madmom.ml.nn import NeuralNetwork
  from madmom.models import *
  from madmom.processors import *
label_desc: Use image node_id 1 for calling the TestBufferProcessor obj's underlying member method code with example usage: obj.test_1d() without return types