#查找index函数的帮助 help(str.index) #for循环和break语句from math import sqrtfor i in range(2,101): flag=1 k=int(sqrt(i)) for j in range(2,k+1): if i%j==0: flag=0 break if(flag): print i #continue语句,满足条件跳出continue后面的语句sumA=0i=1while i<=5: sumA+=i i+=1 if i==3: c
Candidate Elimination Thanks for Sanketh Vedula. This is a good demo to understand candidate elimination algorithm that I have optimized based on this guy's good work. rika@rika-UX303UB$ ./a.out <Input> Number of Features: <Input> Number of At
np.arange(int a) 生成一个一维array,元素个数是a个,元素是0到a-1 注意arange不能直接生成多维array np.arange(int a).reshape(int b,int c) 生成一个一维array,个数为a,然后改成二维数组b*c,b*c=a:也可更多维 reshape与原shape无关,只要总元素个数符合即可 reshape返回的对象实际是原array的一个引用,仅形式不一样,改变一个,两个都会变 np.arange(int a, dtype=np.uin
文章目录 Line Plot One figure, a set of subplots Image 展示图片 展示二元正态分布 A sample image Interpolating images 插值图像? Clip path Contouring and Pseudocolor 轮廓与伪彩色 Histograms hist() Paths Three-dimensional plotting Streamplot 流线图? Ellipses 椭圆 Bar charts 条形图 Pie c
import sysimport tushare as tsimport numpy as npdata=ts.get_h_data('601066')print(data)#读出兴业银行7列数据date open high close low volume amount data.to_csv('E:/csv statistic/day/601066.csv') 把读取的股票数据存入某个内存空间中 #开始读某列数据 c,v=np.loadtxt('E:/cs