Just use views and this becomes much more efficient:
@views map!(!,A[2:2:end],A[2:2:end])
Or use broadcasting, even faster:
A[2:2:end] .= .!(@view A[2:2:end])
Just use views and this becomes much more efficient:
@views map!(!,A[2:2:end],A[2:2:end])
Or use broadcasting, even faster:
A[2:2:end] .= .!(@view A[2:2:end])