摘要: import numpy as np array = np.array([[1,2,3], [2,3,4]]) #打印列表 print(array)#是几维的 print('number of dim:',array.ndim)#几行几列 print('shape:',array.shape)#一共有多少个元素 print('size:',array.si... 阅读全文
posted @ 2018-12-07 17:30 萧白白 阅读(162) 评论(0) 推荐(0)
摘要: # View more python tutorials on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontu... 阅读全文
posted @ 2018-12-07 15:14 萧白白 阅读(174) 评论(0) 推荐(0)
摘要: # View more python tutorials on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontu... 阅读全文
posted @ 2018-12-07 14:57 萧白白 阅读(215) 评论(0) 推荐(0)
摘要: import matplotlib.pyplot as plt import numpy as np def f(x,y): # the height function return (1 - x / 2 + x**5 + y**3) * np.exp(-x**2 -y**2) n = 256 x = np.linspace(-3, 3, n) y = np.linspace... 阅读全文
posted @ 2018-12-07 14:47 萧白白 阅读(645) 评论(0) 推荐(0)
摘要: import matplotlib.pyplot as plt import numpy as np n = 12 X = np.arange(n) Y1 = (1 - X / float(n)) * np.random.uniform(0.5, 1.0, n) Y2 = (1 - X / float(n)) * np.random.uniform(0.5, 1.0, n) plt.bar(... 阅读全文
posted @ 2018-12-07 14:19 萧白白 阅读(312) 评论(0) 推荐(0)
摘要: import matplotlib.pyplot as plt import numpy as np n = 1024 X = np.random.normal(0,1,n) Y = np.random.normal(0,1,n) T = np.arctan2(Y,X) #for color value plt.scatter(X,Y,s=75,c=T,alpha=0.5) plt.scat... 阅读全文
posted @ 2018-12-07 13:18 萧白白 阅读(208) 评论(0) 推荐(0)
摘要: # View more python tutorials on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontu... 阅读全文
posted @ 2018-12-07 10:36 萧白白 阅读(284) 评论(0) 推荐(0)