原文: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