Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "FastTransforms"
uuid = "057dd010-8810-581a-b7be-e3fc3b93f78c"
version = "0.17"
version = "0.17.1"


[deps]
Expand Down
7 changes: 5 additions & 2 deletions src/toeplitzhankel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ end

function *(P::ChebyshevToLegendrePlanTH, v::AbstractVector{S}) where S
n = length(v)
iszero(n) && return v
ret = zero(S)
@inbounds for k = 1:2:n
ret += -v[k]/(k*(k-2))
Expand Down Expand Up @@ -178,7 +179,9 @@ function _leg2chebTH_TLC(::Type{S}, mn, d) where S
C = hankel_partialchol(λ)
T = plan_uppertoeplitz!(t, (mn..., size(C,2)), d)
L = copy(C)
L[1,:] ./= 2
if n > 0
L[1,:] ./= 2
end
T,L,C
end

Expand Down Expand Up @@ -215,7 +218,7 @@ _sub_dim_by_one(d, m, n...) = (isone(d) ? m-1 : m, _sub_dim_by_one(d-1, n...)...

function _cheb2legTH_TLC(::Type{S}, mn, d) where S
n = mn[d]
t = zeros(S,n-1)
t = zeros(S,max(0,n-1))
S̃ = real(S)
if n > 1
t[1:2:end] = Λ.(0:one(S̃):div(n-2,2), -half(S̃), one(S̃))
Expand Down
9 changes: 9 additions & 0 deletions test/toeplitzhankeltests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,13 @@ Random.seed!(0)
@test pl\(pl*copy(X)) X
end
end

@testset "empty" begin
@test isempty(FastTransforms.th_cheb2leg(Float64[]))
@test isempty(FastTransforms.th_leg2cheb(Float64[]))
@test isempty(FastTransforms.th_leg2chebu(Float64[]))
@test isempty(FastTransforms.th_cheb2jac(Float64[], 0.1, 0.2))
@test isempty(FastTransforms.th_jac2cheb(Float64[], 0.1, 0.2))
@test isempty(FastTransforms.th_ultra2ultra(Float64[], 0.1, 0.2))
end
end
Loading