code: def test_1d_array():
      f1 = GHFilter(0, 0, 1, 0.8, 0.2)
      f2 = GHFilter(array([0]), array([0]), 1, 0.8, 0.2)
  
      str(f1)
      str(f2)
  
      # test both give same answers, and that we can
      # use a scalar for the measurment
      for i in range(1, 10):
          f1.update(i)
          f2.update(i)
  
          assert f1.x == f2.x[0]
          assert f1.dx == f2.dx[0]
  
          assert f1.VRF() == f2.VRF()
  
      # test using an array for the measurement
      s1 = Saver(f1)
      s2 = Saver(f2)
  
      for i in range(1, 10):
          f1.update(i)
          f2.update(array([i]))
  
          s1.save()
          s2.save()
  
          assert f1.x == f2.x[0]
          assert f1.dx == f2.dx[0]
  
          assert f1.VRF() == f2.VRF()
      s1.to_array()
      s2.to_array()
  
file_path: filterpy/filterpy/gh/tests/test_gh.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from filterpy.common import Saver
  from filterpy.gh import GHFilter, GHKFilter, least_squares_parameters, optimal_noise_smoothing, GHFilterOrder
  from numpy import array
  from numpy.random import randn
  import matplotlib.pyplot
label_desc: Use image node_id 2 for calling a global function with example usage: test_1d_array() without return types