Skip to content

Commit

Permalink
use begin instead of 1-based indexing
Browse files Browse the repository at this point in the history
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
  • Loading branch information
Marek Kaluba and devmotion authored Oct 23, 2023
1 parent 135e43a commit 833a18e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shapiro_wilk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function shapiro_wilk_coefs(N::Integer)
end

function unsafe_swstat(X::AbstractVector{<:Real}, A::AbstractVector{<:Real})
AX = @inbounds dot(view(A, 1:length(X)), X)
AX = @inbounds dot(@view(A[begin:(begin + length(X) - 1)]), X)
= moment(X, 2)
W = AX^2 /
return min(W, one(W)) # to guard against numeric errors
Expand Down

0 comments on commit 833a18e

Please sign in to comment.