自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 问答 (3)
  • 收藏
  • 关注

原创 MPA海洋捕食者算法学习笔记

关于海洋捕食者(MPA)的学习笔记,从头至尾的讲解了优化过程以及相关的matlab代码,欢迎大家一起共同讨论

2022-04-27 20:42:23 2329

转载 解决:python中出现:list assignment index out of range.或者说如何存储遍历出来的数据

出现的bug:Traceback (most recent call last): File "E:/testPython/NumPY/test.py", line 67, in <module> readIp() File "E:/testPython/NumPY/test.py", line 59, in readIp iplist[i]=ipIndexError: list assignment index out of range这是因为用列表装字典内容...

2021-11-08 18:27:30 4994

原创 python中如何完整保存可视化图片

生成的图片保存后发现左边少了一部分需要将代码中添加参数 bbox_inches = 'tight' plt.savefig('XGBoost_feature_importance.png', bbox_inches = 'tight') plt.show()

2021-07-18 14:34:21 968

转载 OSError: Initializing from file failed

Python版本:Python 3.6pandas.read_csv() 报错 OSError: Initializing from file failed,一般由两种情况引起:一种是函数参数为路径而非文件名称,另一种是函数参数带有中文。import pandas as pdda1=pd.read_csv('F:\\数据源')da2=pd.read_csv('F:\\2.0 数据源\\工程清单.csv')这两种情况报错信息都是一样:Traceback (most recent call

2021-07-08 16:59:54 6031

转载 syntaxerror: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: truncated \ux

Python运行后,报错:SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape原因:window 读取文件可以用\,但是在字符串中\是被当作转义字符来使用,经过转义之后可能就找不到路径的资源了,例如\t会转义为tab键>>> def func1(path_name):... import os.

2021-07-08 16:54:54 395

原创 upgrade pip‘ command

出现 Could not find a version that satisfies the requirement costcla.metrics.costs (from versions: )No matching distribution found for costcla.metrics.costsYou are using pip version 9.0.1, however version 21.1.3 is available.You should consider upgradi.

2021-07-07 10:59:01 3606

原创 python如何一下注释掉多行代码,或者一下取消多行注释

python小技巧,将需要注释的多行代码选中,不用全部选中,某一行只要有一个代码被选中了也行。data_train=data_train_all.Tdata_test=data_test_all.T

2021-06-02 16:40:29 5929 2

转载 ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64‘).

问题:在训练模型 fit(x_train,y_train) 时遇到报错ValueError:Input contains NaN, infinity or a value too large for dtype('float64')

2021-06-02 16:29:42 13232 2

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除