out[ ]array([- - - ] multidimensional arrays can have each section of values sorted in-place along an axis by passing the axis number to sortin [ ]arr randn( in [ ]arr out[ ]array([[- - - ] - - ][- - ][- - ] - ]]in [ ]arr sort( in [ ]arr out[ ]array([[- - - ][- - ][- - ][- - ][- ]]the top level method np sort returns sorted copy of an array instead of modifying the array in place quick-and-dirty way to compute the quantiles of an array is to sort it and select the value at particular rankin [ ]large_arr randn( in [ ]large_arr sort(in [ ]large_arr[int( len(large_arr)) quantile out[ ]- for more details on using numpy' sorting methodsand more advanced techniques like indirect sortssee several other kinds of data manipulations related to sorting (for examplesorting table of data by one or more columnsare also to be found in pandas unique and other set logic numpy has some basic set operations for one-dimensional ndarrays probably the most commonly used one is np uniquewhich returns the sorted unique values in an arrayin [ ]names np array(['bob''joe''will''bob''will''joe''joe']in [ ]np unique(namesout[ ] numpy basicsarrays and vectorized computation www it-ebooks info