C1W2_Assignment submitting error

Hello everyone,

I am trying to submit my assignment but I keep getting a zero. The error I am getting is:

only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

The problem is that I actually used integers only for the whole solution. Can any one give me any advice here?

That exception means that you must be using a variable to index one of the arrays that is not an integer value. E.g. maybe itā€™s actually an array itself. If everything passes in the notebook and then it fails like that in the grader, one type of error to look for would be referencing global variables in your function logic. Maybe that variable name means something different in the grader context.

1 Like

I accidently wrote some values in the assignment , now I cannot distinguish the values I want include in the None placeholders, if I were to restart the assignment as a first attempt without the changes and the data i implemented ,Please give a way on how to do this

Hi @BENSIMMONS ,

You can get a fresh copy of the assignment by clicking the ā€˜?ā€™ button on the top right corner of the Coursera window. Select the ā€˜update versionā€™ option will get you a fresh copy of the assignment. But first you need to rename the existing assignment notebook if you want to keep some work you have already done for reference, otherwise, delete that notebook. The update will not go ahead if there is an existing assignment.

1 Like

This is extremely important. Use the File menu to either rename or delete your existing notebook ipynb file.

Hi thanks for the help Mr Kic , but what if it shows 404: not found

The ā€œHelp ā†’ Get Latest Versionā€ procedure still works even if the notebook has been deleted. The full detailed instructions are in this thread.

1 Like