Skip to content

Commit

Permalink
Use init=1 in normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Feb 5, 2024
1 parent cb0e1d6 commit 629ac70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/definitions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ _checkindex(szinds, region) = all(r -> checkindex(Bool, szinds, r), region)
@inline function normalization(::Type{T}, sz, region) where T
@boundscheck (!isempty(region) && _checkindex(eachindex(sz), region)) ||
throw(BoundsError(sz, region))
one(T) / mapreduce(r -> Int(@inbounds sz[r])::Int, *, region; init=oneunit(eltype(sz)))::Int
one(T) / mapreduce(r -> Int(@inbounds sz[r])::Int, *, region; init=1)::Int
end
normalization(X, region) = normalization(real(eltype(X)), size(X), region)

Expand Down

0 comments on commit 629ac70

Please sign in to comment.