上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页
摘要: from matplotlib import pyplot import numpy n=1024 x=numpy.random.normal(0,1,1024) y=numpy.random.normal(0,1,1024) t=numpy.arctan2(x,y) #代表颜色的数量值 #pypl 阅读全文
posted @ 2020-06-19 11:45 马蹄哒哒 阅读(222) 评论(0) 推荐(0)
摘要: import numpy from matplotlib import pyplot x=numpy.linspace(-3,3,50) y=2*x+1 pyplot.figure(num=1,figsize=(5,5)) pyplot.plot(x,y,linewidth=10,zorder=1) 阅读全文
posted @ 2020-06-19 11:35 马蹄哒哒 阅读(156) 评论(0) 推荐(0)
摘要: import numpy a=numpy.arange(1,25).reshape(8,3) #对二维进行数组转置 b=numpy.transpose(a) c=a.transpose() d=a.T #print(d) print('对于三维a[i][j][k]进行转置,默认的将i和k交换,j位置 阅读全文
posted @ 2020-06-19 11:20 马蹄哒哒 阅读(784) 评论(0) 推荐(0)
摘要: import numpy x=numpy.arange(9) array([0, 1, 2, 3, 4, 5, 6, 7, 8]) #对一维数组进行分隔 a=numpy.split(x,3) #将数组平均分成3份 #传递数组按位置进行分隔 b=numpy.split(x,[3,5]) print(a 阅读全文
posted @ 2020-06-19 11:04 马蹄哒哒 阅读(349) 评论(0) 推荐(0)
摘要: import numpy from matplotlib import pyplot x=numpy.linspace(-3,3,50) y=2*x+1 pyplot.figure(num=1,figsize=(5,5)) pyplot.plot(x,y) ax=pyplot.gca() ax.sp 阅读全文
posted @ 2020-06-18 19:32 马蹄哒哒 阅读(341) 评论(0) 推荐(0)
摘要: pyplot.rcParams['font.sans-serif']=['simhei'] #显示中文标签 pyplot.rcParams['axes.unicode_minus']=False 阅读全文
posted @ 2020-06-18 13:23 马蹄哒哒 阅读(217) 评论(0) 推荐(0)
摘要: import numpy from matplotlib import pyplot x=numpy.linspace(-3,3,50) y1=2*x+1 y2=x**2 pyplot.rcParams['font.sans-serif']=['simhei'] #显示中文标签 pyplot.rcP 阅读全文
posted @ 2020-06-18 13:21 马蹄哒哒 阅读(274) 评论(0) 推荐(0)
摘要: import numpy #创建数组 a=numpy.array([[1,2,3],[4,5,6]]) b=numpy.array([[11,34,56],[4,6,78]]) #使用hstack进行水平拼接 r=numpy.hstack([a,b]) #也可以使用()把a,b括起来 #使用vsta 阅读全文
posted @ 2020-06-18 11:52 马蹄哒哒 阅读(654) 评论(0) 推荐(0)
摘要: import numpy a=numpy.arange(27).reshape(3,3,3) b=numpy.arange(12) c=numpy.reshape(b,(2,3,2)) #修改为三维数组 #将多维数组修改为一维数组 d=c.reshape(12) e=c.reshape(-1) #通 阅读全文
posted @ 2020-06-18 10:57 马蹄哒哒 阅读(389) 评论(0) 推荐(0)
摘要: 1 import numpy 2 from matplotlib import pyplot 3 x=numpy.linspace(-3,3,50) 4 y1=2*x+1 5 y2=x**2 6 7 8 pyplot.figure(num='第一幅图',figsize=(5,5)) 9 pyplot 阅读全文
posted @ 2020-06-17 14:21 马蹄哒哒 阅读(414) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页