回答編集履歴

1

2022/12/05 16:26

投稿

melian
melian

スコア19803

test CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  pixel = np.array([0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 0, 0, 0])
6
6
  white = np.where(pixel==255)[0]
7
- idx = len(white)//2
7
+ idx = white[len(white)//2]
8
- print(white[idx])
8
+ print(idx)
9
9
 
10
10
  # 7
11
11
  ```