Skip to content
This repository was archived by the owner on Sep 28, 2024. It is now read-only.

Commit ff8c13f

Browse files
committed
add type declaration
1 parent 9ac12ad commit ff8c13f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Transform/chebyshev_transform.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function truncate_modes(t::ChebyshevTransform, 𝐱̂::AbstractArray)
1414
return view(𝐱̂, map(d -> 1:d, t.modes)..., :, :) # [t.modes..., in_chs, batch]
1515
end
1616

17-
function inverse(t::ChebyshevTransform{N}, 𝐱̂::AbstractArray, M) where {N}
17+
function inverse(t::ChebyshevTransform{N}, 𝐱̂::AbstractArray, M::NTuple{N, Int64}) where {N}
1818
normalized_𝐱̂ = 𝐱̂ ./ (prod(2 .* (size(𝐱̂)[1:N] .- 1)))
1919
return FFTW.r2r(normalized_𝐱̂, FFTW.REDFT01, 1:N) # [size(x)..., in_chs, batch]
2020
end

src/Transform/fourier_transform.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ end
1616

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

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

0 commit comments

Comments
 (0)