Skip to content

Commit cb0b0ed

Browse files
committed
fix TruncationByOrder sorted and rev strategy
1 parent 24c3759 commit cb0b0ed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/implementations/truncation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function findtruncated(values::AbstractVector, strategy::TruncationByOrder)
4242
end
4343
function findtruncated_sorted(values::AbstractVector, strategy::TruncationByOrder)
4444
howmany = min(strategy.howmany, length(values))
45-
return 1:howmany
45+
return strategy.rev ? (1:howmany) : ((length(values) - howmany + 1):length(values))
4646
end
4747

4848
function findtruncated(values::AbstractVector, strategy::TruncationByFilter)

0 commit comments

Comments
 (0)