convolve

convolve#

stimupy.utils.convolve(arr1, arr2, mode='same', axes=None, padding=False)#

Convolve two N-dimensional arrays using FFT

Parameters:
  • arr1 (numpy.ndarray) – Input array 1

  • arr2 (numpy.ndarray) – Input array 2

  • mode (str {"full", "valid", "same"}, optional) – String which indicates the size of the output. The default is “same”.

  • axes (int or None (default), optional) – Axes over which to convolve. The default is over all axes

  • padding (Bool) – if True, pad array before convolving

Returns:

out – Output array

Return type:

numpy.ndarray