def leftordered(M):
 l = list(M.T)
 l.sort(key=tuple)
 return array(l)[::(-1)].T

def leftordered ( M ) : l = list ( M . T ) l . sort ( key = tuple ) return array ( l ) [ : : ( - 1 ) ] . T
returns the given matrix in left-ordered-form .