I am stuck at Programming assignment of Week 2 of Supervised Machine Learning Course. As on submission i get this error, The truth value of an array with more than one element is ambiguous. Use a.any() or a.all(). And I’m unable to understand this and I get 0 grades and i can’t move ahead.
This kind of error can happen because the grader uses different tests than the notebook uses.
I expect this means that somewhere in your code, you’re computing a result that is a vector, when a scalar is expected.
Try reviewing all of the results from the test cases in the notebook, and check if any of them display a list of values where the Expected Output has just a single value.
I had tried editing the pre coded cells, and I’m getting the same error at notebook tests. I don’t know why.
It’ll be helpful if you help me regardíng this.
Thanks & Best Regards.
Muhammad Zohaib Ali.
That can cause problems. Maybe it would be best if you start over with a clean copy of the notebook.
Hi,
Please I need assistance this is the error that I’m getting when I tried to submit the programming assignments “Comment line with index: UNQ_C1
wasn’t found in code”
Note that I’m have the same issue for both Week 2 and Week 3.
This means you deleted the line of comment code that the grader uses to identify the graded cells.
How can I get it back?
If you post the first few line of each code cell where the error is happening, I’ll post back the code you should add back in.
Or, you can save your current notebook as a new file name, and then use the “Help → Get latest version” button to get a new copy of the notebook.
Then you would have to copy all your added code from the old notebook to the new one.
Hello @Antonio_Ngbesu_Manze,
Would this be illustrative enough for how to add them back yourself?
Cheers,
Raymond
@Antonio_Ngbesu_Manze, that should be sufficient for you to figure out for yourself what code you deleted and need to add back.
It works, thanks Raymond.