![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
zaego
什么也不会,只想学习.
展开
-
python抛出异常
raise Exception("Invalid level!")原创 2020-09-07 20:41:38 · 80 阅读 · 0 评论 -
Python读写文件
文章目录读文件Readlines()方法代码示例:多行处理函数:readline()方法 读文件 Readlines()方法 file=open(‘output/speed.txt’,‘r’) lines=file.readlines() python读数据时:多加一行空行,结果正确。加两个空行时,倒数第二行也会被读入。 代码示例:多行处理函数: 输入speed.txt: 1 gpu1 Speed 29.26 1 gpu0 Speed 47.15 输出numpy数组转换的batch_speed.cs原创 2020-05-17 10:31:14 · 110 阅读 · 0 评论 -
numpy专题
目录与list的相互转化 与list的相互转化 a=([3.234,34,3.777,6.33]) a为python的list类型 将a转化为numpy的array: np.array(a) array([ 3.234, 34. , 3.777, 6.33 ]) 将a转化为python的list ...原创 2019-01-10 20:23:32 · 94 阅读 · 0 评论