vendredi 4 avril 2014

Sorting a "1D" ndarray in Python


Vote count:

0




As following my previous question. I now have a ndarray with the form:



[[ 0. ]
[ 18.21545873]
[ 14.93752607]
[ 15.55222205]
[ 14.93752607]
[ 10.68406032]
[ 11.54598659]
[ 15.55222205]
[ 11.54598659]
[ 12.30302814]]



  1. How do I sort this array? Since it is not a normal list. It is a ndarray, in other words, it is a list of lists.

  2. Is normal that people sort this list of lists directly, or people usually change it to a normal list


[ 0. , 18.21545873, 14.93752607, 15.55222205, 14.93752607, 10.68406032, 11.54598659, 15.55222205, 11.54598659, 12.30302814] , and then sort this list?


Many thanks!



asked 27 secs ago






Aucun commentaire:

Enregistrer un commentaire