会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Anlovescode
博客园
首页
新随笔
联系
管理
上一页
1
2
3
4
5
6
下一页
2017年12月19日
坐标系旋转的知识
摘要: X y 点 逆时针旋转b角到c d 如下 c= xcos(β)-ysin(β) d= ycos(β)+xsin(β) 顺时针也即坐标轴逆时针 s = os = oa + as = x cos(theta) + y sin(theta) t = ot = ay – ab = y cos(theta)
阅读全文
posted @ 2017-12-19 15:06 Anlovescode
阅读(1126)
评论(0)
推荐(0)
2017年12月11日
格式化输出之 每行N个元素 list拆分
摘要: 每5个输出,加换行 加格式。 zhu 另一个答案 其他的答案正在寻找 有机会深入学一下format语句
阅读全文
posted @ 2017-12-11 11:15 Anlovescode
阅读(706)
评论(0)
推荐(0)
2017年11月24日
Pyhton math 工具 radians pi
摘要: 角度转弧度radians pi值
阅读全文
posted @ 2017-11-24 19:41 Anlovescode
阅读(143)
评论(0)
推荐(0)
2017年11月21日
Python pip下载安装库 临时用清华镜像命令
摘要: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple C:\Users\mu\pip 新建pip.ini
阅读全文
posted @ 2017-11-21 17:11 Anlovescode
阅读(3521)
评论(0)
推荐(0)
2017年10月25日
python 计时程序运行时间
摘要: import time time_start=time.time() time_end=time.time() print('totally cost',time_end-time_start)
阅读全文
posted @ 2017-10-25 15:53 Anlovescode
阅读(96970)
评论(0)
推荐(3)
Numpy 学习 array np.where lexsort 切片 按行按列求平均mean
摘要: array 的创建可以通过list给 array print出来像一个表格,可以按行按列来观察。 原来是一个list相当于一行 np.where用于寻找一个condition下的坐标,返回的是一个2个元素的tuple,第一个元素是一个array,第二个是数据类型 代码的作用是找到返回的下标里的最大值
阅读全文
posted @ 2017-10-25 15:52 Anlovescode
阅读(2255)
评论(0)
推荐(1)
多维数组sorted函数的用法
摘要: 对某一个位置排列 此方法针对按每个list排列,按照第一列元素排序。
阅读全文
posted @ 2017-10-25 15:39 Anlovescode
阅读(421)
评论(0)
推荐(0)
2017年10月20日
优雅的格式化输出
摘要: mat = "{:20}\t{:28}\t{:32}" print(mat.format("占4个长度","占8个长度", "占12长度")) #如果需要居中输出在宽度前面加一个^ mat = "{:^20}\t{:^28}\t{:^32}" print(mat.format("占4个长度","占8个长度", "占12长度"))
阅读全文
posted @ 2017-10-20 17:10 Anlovescode
阅读(300)
评论(0)
推荐(0)
把一行数字(readline)读进List并以科学计数法输出(write)到文件
摘要: 主要过程是读取的时候是一行字符串,需要Strip去除空格等,然后split变成一个List。 注意这时候数据结构是List但是每一个元素是Str性质的。 所以需要map(float,List) 把这个List变成一个新的List,里面每一个元素是Float类型的 然后write函数只能接受一个元素。
阅读全文
posted @ 2017-10-20 00:38 Anlovescode
阅读(707)
评论(0)
推荐(0)
2017年9月20日
获取文件全路径之后得到文件名的操作
摘要: 用自带的os模块或者分割split 路径 - - 注意python里获得的路径是/ 而不是\ RESTART: C:\Users\AN\Desktop\learn Python\IDEL.py testtest>>>
阅读全文
posted @ 2017-09-20 13:36 Anlovescode
阅读(720)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告