An example of slicing the first two elements out of an array is below. In [1]:. import numpy as np. a = np.array([2, 4, 6]) b = a[0:2] print(b).
確定! 回上一頁