From 1beeace12151ef72448b998e4a72a616dac2f77b Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Sat, 5 Nov 2022 11:51:31 +0530 Subject: [PATCH] add type assertion --- src/definitions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definitions.jl b/src/definitions.jl index 6123f21..a9c4e7f 100644 --- a/src/definitions.jl +++ b/src/definitions.jl @@ -273,7 +273,7 @@ summary(p::ScaledPlan) = string(p.scale, " * ", summary(p.p)) # Normalization for ifft, given unscaled bfft, is 1/prod(dimensions) function normalization(::Type{T}, sz, region) where T @boundscheck !isempty(region) && checkindex(Bool, eachindex(sz), region) - one(T) / mapreduce(r -> Int(@inbounds sz[r]), *, region; init=1) + one(T) / mapreduce(r -> Int(@inbounds sz[r])::Int, *, region; init=oneunit(eltype(sz)))::Int end normalization(X, region) = normalization(real(eltype(X)), size(X), region)