cseel
December 22, 2024, 5:05pm
1
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]]
TMosh
December 22, 2024, 5:14pm
2
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.
cseel
December 22, 2024, 5:53pm
3
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.
TMosh
December 22, 2024, 6:25pm
4
I don’t see that matrix in the notebook.
But there is an example in the notebook like this (including commas):
cseel
December 22, 2024, 6:41pm
5
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