Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.

Commit dd11f29

Browse files
committed
Update numpy
1 parent c717cec commit dd11f29

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import numpy as np
2+
3+
L = [
4+
[1, 2, 3, 4, 5],
5+
[1, 2, 3, 4, 6],
6+
[1, 2, 3, 4, 7],
7+
[1, 2, 3, 4, 8],
8+
]
9+
10+
N = np.array(L)
11+
12+
print(N[:,1])
13+
print(N[:, 1:3])

lessons/python/modules/numpy/numpy_access_one_row.py

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
N = np.array(L)
1111

12-
1312
print(N[1])
1413
print(N[1, :])
1514
print(N[1, :3])
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import numpy as np
2+
3+
L = [
4+
[1, 2, 3, 4, 5],
5+
[1, 2, 3, 4, 6],
6+
[1, 2, 3, 4, 7],
7+
[1, 2, 3, 4, 8],
8+
]
9+
10+
N = np.array(L)
11+
12+
print(N[:3, :3])
13+
print(N[1:, 2:])

0 commit comments

Comments
 (0)