Any thoughts on this exception?

I’m not sure what this means:

An exception was thrown while running your function: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices.
Input matrix:
[[ 1. 2. 3. 4. ]
[-0. 1. 1.3 1.7 ]
[-0. -0. 1. 2.33333333]]

The error means that what is between the square brackets doesn’t have any of the allowed syntax.

Because, the elements in a list must be separated by commas.

I’m unsure what, exactly, I could have done in my code that would remove the commas from my list?

For clarity, I am working on the back substitution problem in the week 2 graded assignment.

I don’t see that matrix in the notebook.

But there is an example in the notebook like this (including commas):

The input matrix I recognize as the expected values of one of the tests for the row echelon form portion of the assignment, so it is associated with the matrix M that we are working with.

I haven’t modified anything outside of what I was supposed to, so I don’t understand how anything I’ve done could change the form of my list?

It’s probably time to just look at your code. We can’t do that on this public thread, but I just sent you a DM about how to proceed with that.

1 Like