
Python
Aniyeee
这个作者很懒,什么都没留下…
展开
-
python 根据序列的连续性切段
python 根据序列的连续性切段原创 2023-04-13 18:16:02 · 266 阅读 · 0 评论 -
python数组中元素格式化输出
python数组元素输出原创 2022-06-22 09:09:08 · 1103 阅读 · 0 评论 -
离散傅里叶变换(python numpy笔记)
numpy中关于离散傅里叶变换原创 2022-03-20 13:29:57 · 8274 阅读 · 1 评论 -
python读取文件例子
利用python读取文本文件举例:profileData = []file_object = open('profile.txt')for line in file_object: profileData.append(line)file_object.close()原创 2022-02-24 15:40:22 · 514 阅读 · 0 评论 -
numpy删除特定行或列
numpy删除特定行或列函数numpy.delete(arr, obj, axis=None)用法objslice, int or array of intsIndicate indices of sub-arrays to remove along the specified axisaxisint, optionalaxis = 0 删除选中行;axis = 1 删除选中列;axis = None 数组展开,flattened例子np.delete(arr, [1,原创 2021-08-07 11:37:40 · 844 阅读 · 0 评论 -
python matplotlib 画图归类(持续更新)
图例matplotlib.pyplot.legend: https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.legend.html#matplotlib.pyplot.legendmatplotlib.axes.Axes.legend:https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.legend.html#matplotlib.pyplot.legendLege原创 2021-04-21 11:03:47 · 533 阅读 · 0 评论 -
(skill) python将非空字符串解读为True
(skill) 在 if 后,python将非空字符串解读为True.例子:>>> a='1'>>> if a:... print("not empty")... else:... print("empty")...not empty>>>>>> a=''>>> if a:... print("not empty")... else:... print("em原创 2021-03-19 17:59:13 · 380 阅读 · 0 评论