pso可视化动画不能执行

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
运行结果及报错内容

Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\JetBrains\PyCharm 2021.1.2\plugins\python\helpers\pydev_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2021.1.2\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/python -pycharm/fristPro/python学习/PSO可视化动画.py", line 17, in
pso = PSO(func=demo_func, n_dim=2, pop=40, max_iter=max_iter, lb=[-2, -2], ub=[2, 2], constraint_ueq=constraint_ueq)
TypeError: init() got an unexpected keyword argument 'n_dim'

我的解答思路和尝试过的方法
我想要达到的结果

初始化函数init参数有问题,应该不支持参数传递

https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_pso_ani.py