上一页 1 ··· 372 373 374 375 376
摘要: import re from common_p3 import download def crawl_sitemap(url): sitemap = download(url) links = re.findall('(.*?)',sitemap) print('links=',links) for link in links: print('l... 阅读全文
posted @ 2017-12-27 11:44 秋华 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 两平行平面方程为Ax+By+Cz+D1=0,Ax+By+Cz+D2=0 阅读全文
posted @ 2017-12-08 16:34 秋华 阅读(8537) 评论(1) 推荐(1) 编辑
摘要: 问题重述与几何模型 已知P1(x1,y1,z1),P2(x2,y2,z2),平面α:ax+by+cz+d=0,求直线P1P2与平面α的交点P。 数学分析 存在性:直线与平面的交点可能有零个,一个,或无数个。 可行性:已知直线上不重合两点,可以确定一条直线,已知直线与平面,则一定可以得到两者之间的关系 阅读全文
posted @ 2017-12-07 21:36 秋华 阅读(23585) 评论(0) 推荐(1) 编辑
摘要: #三维点插值#在三维空间中,利用实际点的值推算出网格点的值import numpy as np point_grid =np.array([[0.0,0.0,0.0],[0.4,0.4,0.4],[0.8,0.8,0.8],[1.0,1.0,1.0]])#网格点坐标 def func(x, y, z): return x*(1-x)*np.cos(4*np.pi*x) * (np.... 阅读全文
posted @ 2017-11-15 14:17 秋华 阅读(26956) 评论(0) 推荐(0) 编辑
摘要: import numpy as np #data 原来数组 #arr_1 新数组 #将data的第一列赋值给arr_1的第一列 arr_1 = np.array((data.shape[0],5)) arr_1[:,0] = data[:,0] #报错 # arr_1[:,0] = data[:,0]#id #IndexError: too many indices for ar... 阅读全文
posted @ 2017-11-15 14:01 秋华 阅读(18244) 评论(0) 推荐(0) 编辑
摘要: import os import shutil import re #获取指定文件中文件名 def get_filename(filetype): name =[] final_name_list = [] source_dir=os.getcwd()#读取当前路径 for root,dirs,files in os.walk(source_dir): ... 阅读全文
posted @ 2017-11-10 12:55 秋华 阅读(11186) 评论(0) 推荐(0) 编辑
摘要: import numpy as np import os path = 'F:\\wenjian'#指定文件所在路径 filetype ='.csv'#指定文件类型 def get_filename(path,filetype): name =[] final_name = [] for root,dirs,files in os.walk(path): ... 阅读全文
posted @ 2017-11-09 18:11 秋华 阅读(12768) 评论(0) 推荐(0) 编辑
摘要: #arr_old 原来数组 #arr_new 保留后的数组 #>=mean+std 指定条件 arr_new = arr_old[arr_old[:,4]>=(mean+std),:]#筛选数组,保留第5列满足条件的行arr_new = arr_old[~(arr_old[:,2]>=4),:]#反转,保留第5列不满足条件的行 阅读全文
posted @ 2017-11-09 13:19 秋华 阅读(17281) 评论(0) 推荐(4) 编辑
上一页 1 ··· 372 373 374 375 376