You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorting with a Perm ordering fails to implement Julia's fallback to compare indices when data are equal (doc, code). Sorting with a By ordering assumes o.order == Forward.
using SortingAlgorithms
using Random: shuffle!
using Base.Order: Perm, By, Forward, Reverse
data =rand(1:10, 10)
inds =shuffle!(collect(1:10))
perm =Perm(Forward, data)
issorted(sort(inds, order=perm), order=perm) # trueissorted(sort(inds, alg=RadixSort, order=perm), order=perm) # false
by =By((-), Reverse)
issorted(sort(inds, order=by), order=by) # trueissorted(sort(inds, alg=RadixSort, order=by), order=by) # false
The text was updated successfully, but these errors were encountered:
Sorting with a Perm ordering fails to implement Julia's fallback to compare indices when data are equal (doc, code). Sorting with a By ordering assumes o.order == Forward.
The text was updated successfully, but these errors were encountered: