
python科学计算
弘彰
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python科学计算(利用numpy创建并访问数组)
利用numpy创建并访问数组引入numpy包:import numpy as np创建np数组a = np.array([1,2,3,4])#b = np.array([1,2,3,4],[5,6,7,8]) #报错c = np.array([[1,2,3,4],[4,5,6,7],[7,8,9,10]])c1 = np.array(([1,2,3,4],[4,5,6,7],[7,...原创 2019-01-09 15:10:29 · 1205 阅读 · 0 评论 -
python中matplotlib绘图总结
python常用绘图示例plot绘制曲线图import numpy as npimport matplotlib.pyplot as pltx = np.linspace(0, 10, 1000)y = np.sin(x)z = np.cos(x**2)plt.figure(figsize=(8,4))plt.plot(x,y,label="$sin(x)$",color="r...原创 2019-03-01 13:44:04 · 927 阅读 · 0 评论