You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Base, it's always the convention that MyMatrix(A) projects A onto the appropriate space: for example, we have Diagonal(A) which ignores off-diagonal entries, and similarly, UpperTriangular(A) and Symmetric(A).
I propose Toeplitz(A::AbstractMatrix) takes the first row and column of A and creates a Toeplitz matrix. This has the benefit that it would automatically support FillArrays.jl syntax Toeplitz(Zeros(n,m)), Toeplitz(Fill(x,n,m)) and Toeplitz(Eye(n)) for creating zero, constant and identity Toeplitz matrices, without needing to depend on FillArrays.jl.
Note that convert(Toeplitz, A) should throw an error if A is not already Toeplitz.
The text was updated successfully, but these errors were encountered:
In Base, it's always the convention that
MyMatrix(A)
projectsA
onto the appropriate space: for example, we haveDiagonal(A)
which ignores off-diagonal entries, and similarly,UpperTriangular(A)
andSymmetric(A)
.I propose
Toeplitz(A::AbstractMatrix)
takes the first row and column ofA
and creates aToeplitz
matrix. This has the benefit that it would automatically support FillArrays.jl syntaxToeplitz(Zeros(n,m))
,Toeplitz(Fill(x,n,m))
andToeplitz(Eye(n))
for creating zero, constant and identity Toeplitz matrices, without needing to depend on FillArrays.jl.Note that
convert(Toeplitz, A)
should throw an error ifA
is not already Toeplitz.The text was updated successfully, but these errors were encountered: