原文:random_sample() takes at most 1 positional argument (2 given)

是random模块下的sample函数,而不是np.random。 ...

2021-11-17 15:41 0 932 推荐指数:

查看详情

python报错: xxx takes 1 positional argument but 2 were given

解析: 这个错误就是 方法只需要传一个参数,但是你传了两个参数,第一个参数是self ,不用传数据, 错误代码: 分析: json.dumps 的源码: 从源码中看到,obj 后有个单独 ...

Sat Nov 30 03:34:00 CST 2019 0 872
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM