I have the following array, which contains X and Y coordinates:
arr = array([[ 1., 3.],
[ 6., 6.],
[ 3., 0.],
[ 2., 5.],
[ 0., 3.],
[ 3., 3.],
[ 0., 6.]])
I would like to know how can I sort this array by first sorting X and after by sorting Y.
I would like something like this:
new_ arr = array([[ 0., 3.],
[ 0., 6.],
[ 1., 3.],
[ 2., 5.],
[ 3., 0.],
[ 3., 3.],
[ 6., 6.]])
numpy.lexsort