回答編集履歴
2
補足
answer
CHANGED
File without changes
|
1
補足
answer
CHANGED
@@ -4,4 +4,11 @@
|
|
4
4
|
import numpy as np
|
5
5
|
scores = [...]
|
6
6
|
np.argsort(scores)
|
7
|
-
```
|
7
|
+
```
|
8
|
+
|
9
|
+
----
|
10
|
+
|
11
|
+
上記の回答はキーの重複がないことを前提にしています。
|
12
|
+
numpyのsortはデフォルトでquicksortです。これはキーが重複した際の順序に関して何も保証がありません(stableではない)。mergesortはstableのようです。もし使う場合はこの点にご注意ください。
|
13
|
+
|
14
|
+
[https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.sort.html#numpy.sort](https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.sort.html#numpy.sort)
|