We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24c3759 commit cb0b0edCopy full SHA for cb0b0ed
1 file changed
src/implementations/truncation.jl
@@ -42,7 +42,7 @@ function findtruncated(values::AbstractVector, strategy::TruncationByOrder)
42
end
43
function findtruncated_sorted(values::AbstractVector, strategy::TruncationByOrder)
44
howmany = min(strategy.howmany, length(values))
45
- return 1:howmany
+ return strategy.rev ? (1:howmany) : ((length(values) - howmany + 1):length(values))
46
47
48
function findtruncated(values::AbstractVector, strategy::TruncationByFilter)
0 commit comments