原文:TypeError: __sigmoid() takes 1 positional argument but 2 were given

問題分析: 可以看出是參數個數的問題,查看函數后發現沒有問題,如圖 解決: 這里實際上是sigmoid的定義處的問題,少定義的了參數def sigmoid self, t : ...

2018-08-05 12:49 0 7333 推薦指數:

查看詳情

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