Skip to content

Commit a55cbb4

Browse files
committed
Add a typeassert in normalization
`Int(x)` does no longer wrap `convert(Int, x)::Int`, so the type assertion has be added manually to ensure inferability. Fixes JuliaMath/FFTW.jl#57.
1 parent 486ce50 commit a55cbb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/definitions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ summary(p::ScaledPlan) = string(p.scale, " * ", summary(p.p))
255255
*(p::Plan, I::UniformScaling) = ScaledPlan(p, I.λ)
256256

257257
# Normalization for ifft, given unscaled bfft, is 1/prod(dimensions)
258-
normalization(T, sz, region) = one(T) / Int(prod([sz...][[region...]]))
258+
normalization(T, sz, region) = one(T) / Int(prod([sz...][[region...]]))::Int
259259
normalization(X, region) = normalization(real(eltype(X)), size(X), region)
260260

261261
plan_ifft(x::AbstractArray, region; kws...) =

0 commit comments

Comments
 (0)