回答編集履歴
1
追加
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
```
|
1
|
+
```Python
|
2
2
|
|
3
3
|
y[index[:,0], index[:,1], index[:,2]]
|
4
4
|
|
@@ -6,8 +6,18 @@
|
|
6
6
|
|
7
7
|
listがほしければ
|
8
8
|
|
9
|
-
```
|
9
|
+
```Python
|
10
10
|
|
11
11
|
list(y[index[:,0],index[:,1],index[:,2]])
|
12
12
|
|
13
13
|
```
|
14
|
+
|
15
|
+
他のやり方
|
16
|
+
|
17
|
+
```Python
|
18
|
+
|
19
|
+
id= np.ravel_multi_index(index.T, tuple(y.shape))
|
20
|
+
|
21
|
+
y.flat[id]
|
22
|
+
|
23
|
+
```
|