
scientific computing
文章平均质量分 50
一从际发
这个作者很懒,什么都没留下…
展开
-
matplotlib绘图:1.基本操作
#learn matpltlib import matplotlib.pyplot as plt import numpy as np ''' plotting several lines with different format styles in one command using arrays''' def test1(): t=np.arange(0,5,0.2)原创 2017-02-22 22:25:52 · 809 阅读 · 0 评论 -
matplotlib-3D绘图
matplotlib可绘制各种种类的3D图形,按需所取。 import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig=plt.figure() ax=fig.add_subplot(111,projection='3d') #Line plots,曲线图 ax.plot(x, y, z) #Scat原创 2017-03-04 13:10:45 · 513 阅读 · 0 评论 -
numpy:入门
为什么需要numpy:Python中的l数据类型list占用资源过大,不适合做大量计算;数据类型array又只能存储一维数组。所以引入numpy来处理多维数组的存储和计算。原创 2017-03-08 23:42:22 · 298 阅读 · 0 评论 -
numpy:自定义数据类型dtype
需求 除了numpy中内置的dtype,有时我们需要自定义类型。比如想创建一个类似C中的结构数组,这时就需要自定义dtype了(和matlab中的cell也类似) 实例 In [1]:person=np.dtype({'names':['name','age','hometown'],'formats':['S32','i','S32']}) In [2]:person In [ ]:p=n原创 2017-04-01 15:37:36 · 15531 阅读 · 1 评论