How to sort a vector¶
Use grade up (⍋) to get the indices that would sort a vector, then index with those:
For descending order, use grade down (⍒):
Sort each row of a matrix¶
Define a sort dfn and apply it at rank 1:
See also: Rank operator -- apply to rows