We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a66e165 commit 07e3414Copy full SHA for 07e3414
1 file changed
src/implementations/truncation.jl
@@ -96,7 +96,7 @@ function _truncerr_impl(values::AbstractVector, I; atol::Real = 0, rtol::Real =
96
# fast path to avoid checking all values
97
ϵᵖ ≥ Nᵖ && return Base.OneTo(0)
98
99
- truncerrᵖ_array = cumsum(map(by, values[reverse(I)]))
+ truncerrᵖ_array = cumsum(map(by, view(values, reverse(I))))
100
rank = length(values) - (findfirst(≥(ϵᵖ), truncerrᵖ_array) - 1)
101
return Base.OneTo(rank)
102
end
0 commit comments