chore(i18n,learn): processed translations (#44851)
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
---
|
||||
id: 5e9a0a8e09c5df3cc3600ed4
|
||||
title: '要素、行、列へのアクセスと変更'
|
||||
challengeType: 11
|
||||
videoId: v-7Y7koJ_N0
|
||||
bilibiliIds:
|
||||
aid: 590517748
|
||||
bvid: BV1Eq4y1f7Fa
|
||||
cid: 409025392
|
||||
dashedName: accessing-and-changing-elements-rows-columns
|
||||
---
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
次の両方の Numpy 配列について 3 列目の値を 20 に変更するコードはどれですか?
|
||||
|
||||
```py
|
||||
a = np.array([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
|
||||
|
||||
# Output:
|
||||
# [[ 1 2 20 4 5]
|
||||
# [ 6 7 20 9 10]]
|
||||
```
|
||||
|
||||
## --answers--
|
||||
|
||||
```python
|
||||
a[:, 3] = 20
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```python
|
||||
a[2, :] = 20
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```python
|
||||
a[:, 2] = 20
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```python
|
||||
a[1, 2] = 20
|
||||
```
|
||||
|
||||
## --video-solution--
|
||||
|
||||
3
|
||||
|
@@ -0,0 +1,49 @@
|
||||
---
|
||||
id: 5e9a0a8e09c5df3cc3600ed3
|
||||
title: Numpy の基本
|
||||
challengeType: 11
|
||||
videoId: f9QrZrKQMLI
|
||||
bilibiliIds:
|
||||
aid: 763014202
|
||||
bvid: BV1K64y1a7bu
|
||||
cid: 409025169
|
||||
dashedName: basics-of-numpy
|
||||
---
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
次のコードは何を表示しますか?
|
||||
|
||||
```python
|
||||
b = np.array([[1.0,2.0,3.0],[3.0,4.0,5.0]])
|
||||
print(b)
|
||||
```
|
||||
|
||||
## --answers--
|
||||
|
||||
```python
|
||||
[[1.0 2.0 3.0]
|
||||
[3.0 4.0 5.0]]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```python
|
||||
[[1. 2. 3.]
|
||||
[3. 4. 5.]]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```python
|
||||
[[1. 3.]
|
||||
[2. 4.]
|
||||
[3. 5.]
|
||||
```
|
||||
|
||||
## --video-solution--
|
||||
|
||||
2
|
||||
|
@@ -0,0 +1,48 @@
|
||||
---
|
||||
id: 5e9a0a8e09c5df3cc3600ed7
|
||||
title: 配列のコピーに関する注意
|
||||
challengeType: 11
|
||||
videoId: iIoQ0_L0GvA
|
||||
bilibiliIds:
|
||||
aid: 633008569
|
||||
bvid: BV1Bb4y127fb
|
||||
cid: 409026161
|
||||
dashedName: copying-arrays-warning
|
||||
---
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
次のコードを実行した後、`a` の値は何になりますか?
|
||||
|
||||
```py
|
||||
import numpy as np
|
||||
|
||||
a = np.array([1, 2, 3, 4, 5])
|
||||
b = a
|
||||
b[2] = 20
|
||||
```
|
||||
|
||||
## --answers--
|
||||
|
||||
```python
|
||||
[1 2 3 4 5]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```python
|
||||
[1 2 20 4 5]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```python
|
||||
[1 20 3 4 5]
|
||||
```
|
||||
|
||||
## --video-solution--
|
||||
|
||||
2
|
||||
|
@@ -0,0 +1,65 @@
|
||||
---
|
||||
id: 5e9a0a8e09c5df3cc3600ed6
|
||||
title: 配列の初期化の問題
|
||||
challengeType: 11
|
||||
videoId: 0jGfH8BPfOk
|
||||
bilibiliIds:
|
||||
aid: 763027834
|
||||
bvid: BV1w64y1a7eo
|
||||
cid: 409025878
|
||||
dashedName: initialize-array-problem
|
||||
---
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
次のような配列を生成する別の方法は何ですか?
|
||||
|
||||
```py
|
||||
[[0. 0. 0. 0. 0. 0. 0.]
|
||||
[0. 1. 1. 1. 1. 1. 0.]
|
||||
[0. 1. 1. 1. 1. 1. 0.]
|
||||
[0. 1. 1. 5. 1. 1. 0.]
|
||||
[0. 1. 1. 1. 1. 1. 0.]
|
||||
[0. 1. 1. 1. 1. 1. 0.]
|
||||
[0. 0. 0. 0. 0. 0. 0.]]
|
||||
```
|
||||
|
||||
## --answers--
|
||||
|
||||
```py
|
||||
output = np.ones((7, 7))
|
||||
|
||||
z = np.zeros((5, 5))
|
||||
z[2, 2] = 5
|
||||
|
||||
output[1:1, -1:-1] = z
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```py
|
||||
output = np.zeros((7,7))
|
||||
|
||||
z = np.ones((5, 5))
|
||||
z[2, 2] = 5
|
||||
|
||||
output[1:-1, 1:-1] = z
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```py
|
||||
output = np.ones((7, 7))
|
||||
|
||||
z = np.zeros((5, 5))
|
||||
z[3, 3] = 5
|
||||
|
||||
output[1:-1, 1:-1] = z
|
||||
```
|
||||
|
||||
## --video-solution--
|
||||
|
||||
2
|
||||
|
@@ -0,0 +1,48 @@
|
||||
---
|
||||
id: 5e9a0a8e09c5df3cc3600ed5
|
||||
title: 異なる配列の初期化
|
||||
challengeType: 11
|
||||
videoId: CEykdsKT4U4
|
||||
bilibiliIds:
|
||||
aid: 718044756
|
||||
bvid: BV1MQ4y1k7BB
|
||||
cid: 409025638
|
||||
dashedName: initializing-different-arrays
|
||||
---
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
次のコードは何を表示しますか?
|
||||
|
||||
```py
|
||||
a = np.array([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
|
||||
|
||||
print(np.full_like(a, 100))
|
||||
```
|
||||
|
||||
## --answers--
|
||||
|
||||
```py
|
||||
[[100 100 100 100 100]]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```py
|
||||
[[100 100 100 100 100]
|
||||
[100 100 100 100 100]]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```py
|
||||
[[ 1 2 3 4 5]
|
||||
[ 6 7 20 9 10]]
|
||||
```
|
||||
|
||||
## --video-solution--
|
||||
|
||||
2
|
||||
|
@@ -0,0 +1,60 @@
|
||||
---
|
||||
id: 5e9a0a8e09c5df3cc3600eda
|
||||
title: データの読み込みと高度なインデックス作成
|
||||
challengeType: 11
|
||||
videoId: tUdBZ7pF8Jg
|
||||
bilibiliIds:
|
||||
aid: 720524642
|
||||
bvid: BV1xQ4y1r7mu
|
||||
cid: 409027117
|
||||
dashedName: loading-data-and-advanced-indexing
|
||||
---
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
次の内容を含む `data.txt` という名前のファイルが与えられます。
|
||||
|
||||
<pre>
|
||||
29,97,32,100,45
|
||||
15,88,5,75,22
|
||||
</pre>
|
||||
|
||||
次の配列を生成するコードはどれですか?
|
||||
|
||||
```py
|
||||
[29. 32. 45. 15. 5. 22.]
|
||||
```
|
||||
|
||||
## --answers--
|
||||
|
||||
```py
|
||||
filedata = np.genfromtxt('data.txt', delimiter=',')
|
||||
output = np.any(filedata < 50)
|
||||
|
||||
print(output)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```py
|
||||
filedata = np.genfromtxt('data.txt', delimiter=',')
|
||||
output = np.all(filedata < 50, axis=1)
|
||||
|
||||
print(output)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```py
|
||||
filedata = np.genfromtxt('data.txt', delimiter=',')
|
||||
output = filedata[filedata < 50]
|
||||
|
||||
print(output)
|
||||
```
|
||||
|
||||
## --video-solution--
|
||||
|
||||
3
|
||||
|
@@ -0,0 +1,53 @@
|
||||
---
|
||||
id: 5e9a0a8e09c5df3cc3600ed8
|
||||
title: 算術演算
|
||||
challengeType: 11
|
||||
videoId: 7txegvyhtVk
|
||||
bilibiliIds:
|
||||
aid: 890533226
|
||||
bvid: BV1KP4y1h733
|
||||
cid: 409026503
|
||||
dashedName: mathematics
|
||||
---
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
次のコードを実行した後、`b` の値は何になりますか?
|
||||
|
||||
```py
|
||||
import numpy as np
|
||||
|
||||
a = np.array(([1, 2, 3, 4, 5], [6, 7, 8, 9, 10]))
|
||||
b = np.max(a, axis=1).sum()
|
||||
```
|
||||
|
||||
## --answers--
|
||||
|
||||
```py
|
||||
10
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```py
|
||||
7
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```py
|
||||
5
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```py
|
||||
15
|
||||
```
|
||||
|
||||
## --video-solution--
|
||||
|
||||
4
|
||||
|
@@ -0,0 +1,53 @@
|
||||
---
|
||||
id: 5e9a0a8e09c5df3cc3600ed9
|
||||
title: 配列の再編成
|
||||
challengeType: 11
|
||||
videoId: VNWAQbEM-C8
|
||||
bilibiliIds:
|
||||
aid: 548035655
|
||||
bvid: BV1fq4y1N7aC
|
||||
cid: 409026755
|
||||
dashedName: reorganizing-arrays
|
||||
---
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
次の配列を生成するコードはどれですか?
|
||||
|
||||
```py
|
||||
[[1. 1.]
|
||||
[1. 1.]
|
||||
[1. 1.]
|
||||
[1. 1.]]
|
||||
```
|
||||
|
||||
## --answers--
|
||||
|
||||
```py
|
||||
a = np.ones((2, 4))
|
||||
b = a.reshape((4, 2))
|
||||
print(b)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```py
|
||||
a = np.ones((2, 4))
|
||||
b = a.reshape((2, 4))
|
||||
print(b)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```py
|
||||
a = np.ones((2, 4))
|
||||
b = a.reshape((8, 1))
|
||||
print(b)
|
||||
```
|
||||
|
||||
## --video-solution--
|
||||
|
||||
1
|
||||
|
@@ -0,0 +1,38 @@
|
||||
---
|
||||
id: 5e9a0a8e09c5df3cc3600ed2
|
||||
title: Numpy とは
|
||||
challengeType: 11
|
||||
videoId: 5Nwfs5Ej85Q
|
||||
bilibiliIds:
|
||||
aid: 293086867
|
||||
bvid: BV1Tf4y1E7QZ
|
||||
cid: 409024791
|
||||
dashedName: what-is-numpy
|
||||
---
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
Numpy の配列が通常の Python のリストよりも高速なのはなぜですか?
|
||||
|
||||
## --answers--
|
||||
|
||||
Numpy はオブジェクトを繰り返し処理する際に型チェックを行わないから。
|
||||
|
||||
---
|
||||
|
||||
Numpy は固定の型を使用するから。
|
||||
|
||||
---
|
||||
|
||||
Numpy は連続したメモリを使用するから。
|
||||
|
||||
---
|
||||
|
||||
上記のすべて。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
4
|
||||
|
Reference in New Issue
Block a user