numpy(0) 数组定义

定义递增数组

import numpy as np
np.arange(12)

array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])

np.zeros(8)

array([0., 0., 0., 0., 0., 0., 0., 0.])

[-2] 倒数第二个元素

参考:
[1] NumPy简明教程(二、数组1) https://blog.csdn.net/sunny2038/article/details/9002531
[2] https://www.runoob.com/numpy/numpy-array-from-numerical-ranges.html
[3] https://www.runoob.com/numpy/numpy-array-creation.html

posted @ 2022-06-27 19:09  xiaoxuxli  阅读(12)  评论(0编辑  收藏  举报