code: def gaussian_filter1d(
      input,
      sigma,
      axis=-1,
      order=0,
      output=None,
      mode="reflect",
      cval=0.0,
      truncate=4.0,
  ):
      """1-D Gaussian filter.
  
      Parameters
      ----------
      %(input)s
      sigma : scalar
          standard deviation for Gaussian kernel
      %(axis)s
      order : int, optional
          An order of 0 corresponds to convolution with a Gaussian
          kernel. A positive order corresponds to convolution with
          that derivative of a Gaussian.
      %(output)s
      %(mode_reflect)s
      %(cval)s
      truncate : float, optional
          Truncate the filter at this many standard deviations.
          Default is 4.0.
  
      Returns
      -------
      gaussian_filter1d : ndarray
  
      Examples
      --------
      >>> from scipy.ndimage import gaussian_filter1d
      >>> gaussian_filter1d([1.0, 2.0, 3.0, 4.0, 5.0], 1)
      array([ 1.42704095,  2.06782203,  3.        ,  3.93217797,  4.57295905])
      >>> gaussian_filter1d([1.0, 2.0, 3.0, 4.0, 5.0], 4)
      array([ 2.91948343,  2.95023502,  3.        ,  3.04976498,  3.08051657])
      >>> import matplotlib.pyplot as plt
      >>> rng = np.random.default_rng()
      >>> x = rng.standard_normal(101).cumsum()
      >>> y3 = gaussian_filter1d(x, 3)
      >>> y6 = gaussian_filter1d(x, 6)
      >>> plt.plot(x, 'k', label='original data')
      >>> plt.plot(y3, '--', label='filtered, sigma=3')
      >>> plt.plot(y6, ':', label='filtered, sigma=6')
      >>> plt.legend()
      >>> plt.grid()
      >>> plt.show()
  
      """
      sd = float(sigma)
      # make the radius of the filter equal to truncate standard deviations
      lw = int(truncate * sd + 0.5)
      # Since we are calling correlate, not convolve, revert the kernel
      weights = _gaussian_kernel1d(sigma, order, lw)[::-1]
      return correlate1d(input, weights, axis, output, mode, cval, 0)
  
imports: from collections.abc import Iterable
  import warnings
  import numpy
  import operator
  from numpy.core.multiarray import normalize_axis_index
  from .None import _ni_support
  from .None import _nd_image
  from .None import _ni_docstrings
label_desc: Use image node_id 6 for calling a global function with example usage: gaussian_filter1d(input, sigma, axis, order, output, mode, cval, truncate) and returns: correlate1d