code: def test_convolve1d():
      ws = [
          np.array([-0.1, 0.5, 0.7, 0.7, 0.5]),
          np.array([0.1, 0.7, 0.5]),
      ]
      for i in range(8):
          for w in ws:
              f = np.random.random((128, 96))
              ww = np.atleast_2d(w)
              fw = mh.convolve(f, ww)
              fww = mh.convolve(f, ww.T)
  
              f0w = mh.convolve1d(f, w, 0)
              f1w = mh.convolve1d(f, w, 1)
  
              assert np.all(fw == f1w)
              assert np.all(fww == f0w)
  
imports: import numpy
  import mahotas
  import mahotas.convolve
  import mahotas
  from mahotas.convolve import convolve1d, gaussian_filter
  import mahotas._filters
  from mahotas.tests.utils import luispedro_jpg
  import pytest
label_desc: Use image node_id 21 for calling a global function with example usage: test_convolve1d() without return types