Python is high or something | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Python is high or something

I'm doing the Decision Tree project in the ML course and it's giving me a stupid error. You know what else is stupid? I can't post images or link posts with images in these questions. I made a post on my profile with the image and the caption "ok wtf?"

27th Jan 2023, 4:59 PM
Aidan ā€œHTMLPuppyā€ Dalzell
Aidan ā€œHTMLPuppyā€ Dalzell  - avatar
3 Respostas
+ 1
Yea Iā€™m pretty sure thatā€™s your problem, roughly created: import numpy as np A = [1, 2, 3] print(np.array(A).sum() / np.array(A).sum()) Produces no error, however remove the parenthesis after sum and thereā€™s your error šŸ‘ (obviously you can pass in parameters if needed)
27th Jan 2023, 5:30 PM
DavX
DavX - avatar
+ 1
Right it is a function I forgot
2nd Feb 2023, 4:10 PM
Aidan ā€œHTMLPuppyā€ Dalzell
Aidan ā€œHTMLPuppyā€ Dalzell  - avatar
0
Aiden, if your struggling to post links can you take a photo of your code (around line 12). However isnā€™t sum a function, shouldnā€™t there be parenthesis?
27th Jan 2023, 5:19 PM
DavX
DavX - avatar