[Numpy-discussion] array sort questions

CL WU anewgene at hotpop.com
Wed Sep 17 13:03:03 EDT 2003

Hi, group,
          I am new to numpy. I have 2 questions for array sort.

1. How to sort an array by its one column or one row?
    I know python build-in sort() can do it for list by passing own cmp 
function. but array function sort() will sort each column or row 
seperately,as I know. I don't want to convert array to list to sort and 
then convert back to array.

2. How to get the rank of a rank-0 array? The first "rank" means the 
order of each element after sorting, instead of the "dimension" meaning 
in numpy.     Just like "rank()" function in splus.

Thank you


More information about the NumPy-Discussion mailing list