Course 1, week 2, exercice 8
Hi all,
I have an error message in the model function. I get the following:
IndexError: only integers, slices (:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indices
I know this question has already come up many times, but I after trying all of the suggested solutions, I still cannot get this right. This is what I have tried/double-checked:
- correct shape of w and X:
w.shape=(4, 1)
X_train.shape=(4, 3) - iteration number: I have removed every default values hard-coded in optimize and model
- params and not parameters
- use X_train and Y_train in optimize
- double checked type and length of
costs
(see in image how I have checked that)
I still get the error. However, I have run the following cell and get the expected train and test accuracy. Can anyone help?
Thank you!