convolve: 1D discrete convolution (numpy-style)

View source: R/058_atoms_affine_conv.R

convolveR Documentation

1D discrete convolution (numpy-style)

Description

convolve() is CVXPY 1.9's preferred name for conv (CVXPY's conv class is deprecated in favor of convolve). For a CVXR Expression argument it builds a Convolve atom; for plain numeric input it computes the same numpy-style convolution the atom does (numpy.convolve(a, b) == stats::convolve(a, rev(b), type = "open")), so the numeric and Expression paths agree.

Usage

convolve(a, b)

Arguments

a, b

Expressions or numeric vectors; at least one must be constant when building an atom.

Details

CVXR masks stats::convolve when attached (R reports this on load). If you specifically want stats' circular cross-correlation or its other options, call convolve directly.

Value

A Convolve atom (for expressions) or a numeric vector.


CVXR documentation built on Aug. 24, 2026, 9:10 a.m.