C1_W3_Assignment Assertion Error Help Please

Y_hat
0.5173733862619162
n_x
1
X.shape[1]
30

AssertionError Traceback (most recent call last)
in
----> 1 Y_hat = forward_propagation(X, parameters)
2
3 print(Y_hat)

in forward_propagation(X, parameters)
36 print (“X.shape[1]”)
37 print (X.shape[1])
—> 38 assert(Y_hat.shape == (n_x, X.shape[1]))
39 return Y_hat

The values if n_x and X.shape[1] is ok, bit the assert function has an error

If your n_x of 1 and X.shape[1] of 30 are correct, then your Y_hat needs to be of shape (1, 30). The Y_hat value that you printed out looks like a scalar.

I printed the Y_hat value before the assert function.

There seems to be no reason that the assert function should not work with :
Y_hat = 0.517…
n_x = 1
X.shape[1] = 30

Your Y_hat does not look like a 1×30 array.