code: def convolve1d(
      input,
      weights,
      axis=-1,
      output=None,
      mode="reflect",
      cval=0.0,
      origin=0,
  ):
      """Calculate a one-dimensional convolution along the given axis.
  
      The lines of the array along the given axis are convolved with the
      given weights.
  
      Parameters
      ----------
      %(input)s
      weights : ndarray
          One-dimensional sequence of numbers.
      %(axis)s
      %(output)s
      %(mode)s
      %(cval)s
      %(origin)s
  
      Returns
      -------
      convolve1d : ndarray
          Convolved array with same shape as input
  
      Examples
      --------
      >>> from scipy.ndimage import convolve1d
      >>> convolve1d([2, 8, 0, 4, 1, 9, 9, 0], weights=[1, 3])
      array([14, 24,  4, 13, 12, 36, 27,  0])
      """
      weights = weights[::-1]
      origin = -origin
      if not len(weights) & 1:
          origin -= 1
      return correlate1d(
          input, weights, axis, output, mode, cval, origin
      )
  
imports: from __future__ import division, print_function, absolute_import
  import warnings
  import numbers
  import numpy
  import operator
  from .None import _ni_support
  from .None import _nd_image
  from .None import _ni_docstrings
label_desc: Use image node_id 3 for calling a global function with example usage: convolve1d(input, weights, axis, output, mode, cval, origin) and returns: correlate1d