对a=np.array([1,2,3,4,5,6,7,8])进行切片操作a[:5],输出结果正确的是:
A. array([5])
B. array([1,2,3,4,5])
C. array([4,5,6,7,8])
D. array([1,2,3,4,5,6])
对a =np.array([1,2,3,4,5,6,7,8])进行迭代切片a[:6:2],以下为正确输出的是:
A. array([1,4,7])
B. array([1,3,5])
C. array([4,6,8])
D. array([6,7,8])