I have a structured numpy array, and I am sorting it by a order. It works pretty fine but in just one direction!
Descending:
sort(myStructuredArray,order=my_order)[::-1]
and
Ascending:
sort(myStructuredArray,order=my_order)
The order my_order is something like [col1,col2,-col3,col4,-col5,...,colN]
and for some columns I would like to order it ascending like col1,col2 and colN and for others descending col3 and col5 (minus signal) .
In this example I would like to sort my array first by col1 ascending, then by col2 ascending, then by col3 descending, then by col4 ascending, then by col5 descending and so on... How can I do that?
Thank you