"TypeError: only integer scalar arrays can be converted to a scalar index"

I am getting this error while perfroming the sum of the cost function . Please help me to understand .

“TypeError: only integer scalar arrays can be converted to a scalar index”

Hi,

I have moved this post to the DLS Course 1 category. Make sure if you have any course-specific doubts, explore the specialization category and post in the relevant course subcategory as course-specific mentors are actively answering the queries there and the threads in the general discussion might not come on their radar and remain unanswered at times.