摘要: 1 import numpy as np 2 a=np.random.rand(5) 3 print(a) 4 [ 0.64061262 0.8451399 0.965673 0.89256687 0.48518743] 5 6 print(a[-1]) ###取最后一个元素 7 [0.48518743] 8 9 print(a[:-1]) ### 除了最后一个取全部 10 [ 0.6406126 阅读全文
posted @ 2019-12-21 16:19 泊月居 阅读(8023) 评论(3) 推荐(1)