Week 2 Exercise 7 - predict: Multiple A Values

TL;DR

The test for the exercise is throwing what appear to be correct-ish values for A, but there are 3 of them. This is causing the test to fail.

Background

  • I am calculating A as the sigmoid of the dot product of w.T and X plus b using the sigmoid(z) function defined in Exercise 3.

  • I have printed the output to the terminal to show that the values for A appear to be in line with what should be expected (sans the 3x repetition of A)

…but

  • I don’t understand why the 3x repetition is occurring

The output of my failing test is below:

I appreciate any pointers that can be provided.

…and I saw it after I posted this.

I wasn’t iterating over if A[0, i]

Glad to hear that you found the solution under your own power. I think there is some kind of Law of Nature that you don’t see the bug until 45 seconds after you make the forum post about it. :laughing: