code: def gaussian_filter1d(
      array,
      sigma,
      axis=-1,
      order=0,
      mode="reflect",
      cval=0.0,
      out=None,
      output=None,
  ):
      """
      filtered = gaussian_filter1d(array, sigma, axis=-1, order=0, mode='reflect', cval=0., out={np.empty_like(array)})
  
      One-dimensional Gaussian filter.
  
      Parameters
      ----------
      array : ndarray
          input array of a floating-point type
  
      sigma : float
          standard deviation for Gaussian kernel (in pixel units)
      axis : int, optional
          axis to operate on
      order : {0, 1, 2, 3}, optional
          An order of 0 corresponds to convolution with a Gaussian
          kernel. An order of 1, 2, or 3 corresponds to convolution with
          the first, second or third derivatives of a Gaussian. Higher
          order derivatives are not implemented
      mode : {'reflect' [default], 'nearest', 'wrap', 'mirror', 'constant', 'ignore'}
          How to handle borders
      cval : double, optional
          If `mode` is constant, which constant to use (default: 0.0)
      out : ndarray, optional
          Output array. Must have same shape and dtype as `array` as well as be
          C-contiguous.
  
      Returns
      -------
      filtered : ndarray
          Filtered version of `array`
  
      """
      _verify_is_floatingpoint_type(array, "gaussian_filter1d")
      sigma = float(sigma)
      s2 = sigma * sigma
      # make the length of the filter equal to 4 times the standard
      # deviations:
      lw = int(4.0 * sigma + 0.5)
      if lw <= 0:
          raise ValueError(
              "mahotas.gaussian_filter1d: sigma must be greater or equal to 0.125 [1/8]"
          )
      x = np.arange(2 * lw + 1, dtype=float)
      x -= lw
      weights = np.exp(x * x / (-2.0 * s2))
      weights /= np.sum(weights)
      # implement first, second and third order derivatives:
      if order == 0:
          pass
      elif order == 1:  # first derivative
          weights *= -x / s2
      elif order == 2:  # second derivative
          weights *= (x * x / s2 - 1.0) / s2
      elif order == 3:  # third derivative
          weights *= (3.0 - x * x / s2) * x / (s2 * s2)
      else:
          raise ValueError(
              "mahotas.convolve.gaussian_filter1d: Order outside 0..3 not implemented"
          )
      return convolve1d(array, weights, axis, mode, cval, out=output)
  
imports: import numpy
  from .None import _convolve
  from .None import morph
  from .internal import _get_output, _normalize_sequence, _verify_is_floatingpoint_type, _as_floating_point_array
  from ._filters import mode2int, modes, _check_mode
label_desc: Use image node_id 8 for calling a global function with example usage: gaussian_filter1d(array, sigma, axis, order, mode, cval, out, output) and returns: convolve1d