摘要:
报错信息如下: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead nparr = 阅读全文
随笔分类 - python 语言
关于Numpy数据类型对象(dtype)使用详解
2021-09-28 22:31 by dreamboy2000, 2019 阅读, 收藏, 编辑
摘要:
常用方法 1 #记住引入numpy时要是用别名np,则所有的numpy字样都要替换 2 #查询数值类型 3 >>>type(float) 4 dtype('float64') 5 # 查询字符代码 6 >>> dtype('f') 7 dtype('float32') 8 >>> dtype('d' 阅读全文
Python获取当前时间或者当前时间戳【转】
2021-06-30 15:14 by dreamboy2000, 442 阅读, 收藏, 编辑
摘要:
Python获取当前时间或者当前时间戳【转】 取得时间相关的信息的话,要用到python time模块,python time模块里面有很多非常好用的功能,你可以去官方文档了解下,要取的当前时间的话,要取得当前时间的时间戳,时间戳好像是1970年到现在时间相隔的时间。你可以试下下面的方式来取得当前时 阅读全文
python关于文件路径和文件名的操作
2019-10-22 17:08 by dreamboy2000, 1929 阅读, 收藏, 编辑
摘要:
转自https://www.cnblogs.com/yibeimingyue/p/9913726.html python关于文件路径和文件名的操作 os.path.abspath(path) #返回绝对路径(包含文件名的全路径) os.path.basename(path) —— 去掉目录路径获取带 阅读全文
Python3 tkinter 实现文件读取及保存
2019-07-30 20:03 by dreamboy2000, 8936 阅读, 收藏, 编辑
摘要:
转载自:https://blog.csdn.net/u013032852/article/details/93996709 1 # !/user/bin/env Python3 2 # -*- coding:utf-8 -*- 3 4 """ 5 file:window.py.py 6 create 阅读全文