I am trying to sort a list of floats (and nan values) in python like:
print max(list)
list.sort()
list.reverse()
for i in range(100):
print list[i]
nan
nan
2.0803176458
nan
nan
23.1620761136
15.9680303803
15.3134388394
14.68055076
11.450492644
8.96268420227
8.15331554187
5.24420616524
3.9665322752
3.69758305442
1.08500491226
-0.227894225141
-0.254784399765
-0.866879940573
-1.21267324819
-2.21811678021
nan
nan
2.69325878444
when I run it I get different values for the max most times and my list is not sorted when it prints out (results are under the code above)
Does anyone have any insight as to why this is happening?