![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 1144 阅读 · 0 评论 -
python中matplotlib绘图总结
python常用绘图示例 plot绘制曲线图 import numpy as np import matplotlib.pyplot as plt x = 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 · 837 阅读 · 0 评论