Week 2 Assignnment Prediction Function in Python

Why do we use matrix A[0,i] in the loop why not A[1,i]??

For arrays in python and many other languages the indexing starts from 0!

Hello, Thanks for reply,

{moderator edit - solution code removed}

What I understand is when we are iterating in vector A for Zeroth row and i th column when the value is greater than 0.5 set it to 1. Also when we set the dimension we set the dimension to be A[1,N] and not A[0,N] ? I am a little confused here please help.

Correct.

I don’t understand this. The shape of A is (1,m). It means we have only one row and m columns in A. So, there cannot be something like A[1,N] as we have only one row in A.

Hello, Thanks for the reply. Oh ! now I got it zeroth row means the first row in the vector because python indexing starts with 0. Got it thankyou. Sorry my questions are very trivial.