This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / linalg / _special_matrices / circulant

function

scipy.linalg._special_matrices:circulant

source: build-install/usr/lib/python3.14/site-packages/scipy/linalg/_special_matrices.py:95

Signature

def circulant(c)

Summary

Construct a circulant matrix.

Extended Summary

Array argument(s) of this function may have additional "batch" dimensions prepended to the core shape. In this case, the array is treated as a batch of lower-dimensional slices; see linalg_batch for details.

Parameters

c : (..., N,) array_like

The first column(s) of the matrix. Multidimensional arrays are treated as a batch: each slice along the last axis is the first column of an output matrix.

Returns

A : (..., N, N) ndarray

A circulant matrix whose first column is given by c. For batch input, each slice of shape (N, N) along the last two dimensions of the output corresponds with a slice of shape (N,) along the last dimension of the input.

Notes

Examples

from scipy.linalg import circulant
circulant([1, 2, 3])
✓
array([[1, 3, 2],
       [2, 1, 3],
       [3, 2, 1]])
circulant([[1, 2, 3], [4, 5, 6]])
✗
array([[[1, 3, 2],
        [2, 1, 3],
        [3, 2, 1]],

       [[4, 6, 5],
        [5, 4, 6],
        [6, 5, 4]]])

See also

hankel

Hankel matrix

solve_circulant

Solve a circulant system.

toeplitz

Toeplitz matrix

Aliases

  • scipy.linalg.circulant

Referenced by