最後活躍 1715843167

sujal's Avatar sujal 已修改 1715843167. 還原成這個修訂版本

1 file changed, 10 insertions

q22.py(檔案已創建)

@@ -0,0 +1,10 @@
1 + # Using NumPy, write a program to create 1-dimensional array, load it with numbers, and perform the operation of
2 + # iteration and slicing on it.
3 +
4 + import numpy as np
5 +
6 + print(arr := np.array([2, 3, 4, 1, 7, 6]))
7 + for e in np.nditer(arr):
8 + print(e, end=" ")
9 + print()
10 + print(arr[2:5])
上一頁 下一頁