Is it possible to sort an array with the smallest values on the bottom left and the highest on the top right?
For example :
I've this array :
[[-1. 1. 1.]
[ 1. 1. 1.]
[ 1. 1. 1.]
[ 1. 1. 1.]
[ 1. 1. 1.]
[-1. 1. 1.]]
the sort would be like
[[1. 1. 1.]
[ 1. 1. 1.]
[ 1. 1. 1.]
[ 1. 1. 1.]
[-1. 1. 1.]
[-1. 1. 1.]]
An other example :
[[-1. 1. 1.]
[ 1. 1. 1.]
[ 1. 1. 1.]
[ 4. 3. 1.]
[ 1. 1. 1.]
[-1. 1. 1.]]
Would be :
[[ 1. 1. 4.]
[ 1. 1. 3.]
[ 1. 1. 1.]
[ 1. 1. 1.]
[-1. 1. 1.]
[-1. 1. 1.]]
I Tried Numpy sort :
MyArray.sort()
But it seems not ordering this way.
np.arraynumpytag to the question.