python学习日记12numpy与linspace

中文网站
https://www.numpy.org.cn/
https://www.numpy.org.cn/user_guide/quickstart_tutorial/the_basics.html#数组的创建

from numpy import pi
np.linspace( 0, 2, 9 ) # 9 numbers from 0 to 2
array([ 0. , 0.25, 0.5 , 0.75, 1. , 1.25, 1.5 , 1.75, 2. ])
x = np.linspace( 0, 2*pi, 100 ) # useful to evaluate function at lots of points
f = np.sin(x)

英文网站
http://www.numpy.org/

猜你喜欢

转载自blog.csdn.net/weixin_43387285/article/details/84096455
今日推荐