Skip to content

Commit

Permalink
fix signature
Browse files Browse the repository at this point in the history
  • Loading branch information
tknopp committed Nov 29, 2022
1 parent ff8c13f commit cdea34e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Transform/chebyshev_transform.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function truncate_modes(t::ChebyshevTransform, 𝐱̂::AbstractArray)
return view(𝐱̂, map(d -> 1:d, t.modes)..., :, :) # [t.modes..., in_chs, batch]
end

function inverse(t::ChebyshevTransform{N}, 𝐱̂::AbstractArray, M::NTuple{N, Int64}) where {N}
function inverse(t::ChebyshevTransform, 𝐱̂::AbstractArray{T,N}, M::NTuple{N, Int64}) where {T,N}
normalized_𝐱̂ = 𝐱̂ ./ (prod(2 .* (size(𝐱̂)[1:N] .- 1)))
return FFTW.r2r(normalized_𝐱̂, FFTW.REDFT01, 1:N) # [size(x)..., in_chs, batch]
end
Expand Down
2 changes: 1 addition & 1 deletion src/Transform/fourier_transform.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ end

truncate_modes(ft::FourierTransform, 𝐱_fft::AbstractArray) = low_pass(ft, 𝐱_fft)

function inverse(ft::FourierTransform{N}, 𝐱_fft::AbstractArray, M::NTuple{N, Int64}) where {N}
function inverse(ft::FourierTransform, 𝐱_fft::AbstractArray{T,N}, M::NTuple{N, Int64}) where {T,N}
return real(irfft(𝐱_fft, M[1], 1:ndims(ft))) # [size(x_fft)..., out_chs, batch]
end

0 comments on commit cdea34e

Please sign in to comment.