copapy.filters.gaussian_filter#

copapy.filters.gaussian_filter(a, sigma, truncate=4.0)#

Gaussian filter for 1D, 2D and 3D inputs. The filter is separable: one 1D convolution is computed for each axis. The input is extended with zeros beyond its edges (like the mode ‘constant’ of scipy.ndimage.gaussian_filter).

Overloads:
  • a (vector[Any]), sigma (float | Sequence[float]), truncate (float) = 4.0 → vector[float]

  • a (tensor[Any]), sigma (float | Sequence[float]), truncate (float) = 4.0 → tensor[float]

  • a (array[Any] | Sequence[Any]), sigma (float | Sequence[float]), truncate (float) = 4.0 → array[float]

Parameters:
  • a (Any) – Input vector, tensor, array or nested sequences

  • sigma (float | Sequence[float]) – Standard deviation of the Gaussian in elements, a single number for all axes or one number per axis. An axis with sigma 0 is not filtered.

  • truncate (float) – The kernel is truncated at this many standard deviations.

Returns:

Filtered values with the shape and type of the input.