From b2b41daf5b79cedb090cf9edc7ef4687f545f45b Mon Sep 17 00:00:00 2001 From: Andy Zhang <37402126+AnzhiZhang@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:00:29 +0100 Subject: [PATCH] feat(matrices): update hankel constructors --- src/matrices/hankel.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/matrices/hankel.jl b/src/matrices/hankel.jl index 6ff493d..874d641 100644 --- a/src/matrices/hankel.jl +++ b/src/matrices/hankel.jl @@ -32,7 +32,8 @@ struct Hankel{T<:Number} <: AbstractMatrix{T} end # constructors -Hankel(n::T) where {T<:Integer} = Hankel(T[1:n;]) +Hankel(n::Integer) = Hankel{Int}(n) +Hankel{T}(n::Integer) where {T<:Number} = Hankel(T[1:n;]) Hankel(v::AbstractVector{T}) where {T} = Hankel(v, T[]) # metadata