parameters: (c)
return_statement: return as_strided(c_ext[L-1:], shape=(L, L), strides=(-n, n)).copy()
docstring: Construct a circulant matrix.
  
      Parameters
      ----------
      c : (N,) array_like
          1-D array, the first column of the matrix.
  
      Returns
      -------
      A : (N, N) ndarray
          A circulant matrix whose first column is `c`.
  
      See Also
      --------
      toeplitz : Toeplitz matrix
      hankel : Hankel matrix
      solve_circulant : Solve a circulant system.
  
      Notes
      -----
      .. versionadded:: 0.8.0
  
      Examples
      --------
      >>> from scipy.linalg import circulant
      >>> circulant([1, 2, 3])
      array([[1, 3, 2],
             [2, 1, 3],
             [3, 2, 1]])
docstring_summary: Construct a circulant matrix.
docstring_tokens: Construct a circulant matrix .
function: def circulant(c):
      """
      Construct a circulant matrix.
  
      Parameters
      ----------
      c : (N,) array_like
          1-D array, the first column of the matrix.
  
      Returns
      -------
      A : (N, N) ndarray
          A circulant matrix whose first column is `c`.
  
      See Also
      --------
      toeplitz : Toeplitz matrix
      hankel : Hankel matrix
      solve_circulant : Solve a circulant system.
  
      Notes
      -----
      .. versionadded:: 0.8.0
  
      Examples
      --------
      >>> from scipy.linalg import circulant
      >>> circulant([1, 2, 3])
      array([[1, 3, 2],
             [2, 1, 3],
             [3, 2, 1]])
  
      """
      c = np.asarray(c).ravel()
      # Form an extended array that could be strided to give circulant version
      c_ext = np.concatenate((c[::-1], c[:0:-1]))
      L = len(c)
      n = c_ext.strides[0]
      return as_strided(c_ext[L-1:], shape=(L, L), strides=(-n, n)).copy()
function_tokens: def circulant ( c ) : c = np . asarray ( c ) . ravel ( ) # Form an extended array that could be strided to give circulant version c_ext = np . concatenate ( ( c [ : : - 1 ] , c [ : 0 : - 1 ] ) ) L = len ( c ) n = c_ext . strides [ 0 ] return as_strided ( c_ext [ L - 1 : ] , shape = ( L , L ) , strides = ( - n , n ) ) . copy ( )