摘要: import numpy as np print(np.arange(15)) a = np.arange(15).reshape(5,3) # 矩阵重组 print(a) [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14] [[ 0 1 2] [ 3 4 5] [ 6 7 阅读全文
posted @ 2023-09-13 00:13 郭小睿 阅读(15) 评论(0) 推荐(0) 编辑
摘要: import numpy world_alcohol=numpy.genfromtxt('world_alcohol.txt',delimiter=",",dtype=str,encoding='utf-8') print(type(world_alcohol)) <class 'numpy.nda 阅读全文
posted @ 2023-09-13 00:11 郭小睿 阅读(8) 评论(0) 推荐(0) 编辑
摘要: import numpy vector = numpy.array(["1","2","3"]) print(vector) print(vector.dtype) vector = vector.astype(float) #类型转换 print(vector) print(vector.dtyp 阅读全文
posted @ 2023-09-13 00:08 郭小睿 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 集成开发环境 Anaconda Anaconda Prompt Jupyter Notebook Anaconda Prompt # 查看环境已经安装的库 conda list Jupyter Notebook 设置工作目录 打开anaconda prompt ,输入jupyter notebook 阅读全文
posted @ 2023-09-13 00:02 郭小睿 阅读(13) 评论(0) 推荐(0) 编辑