code:

A=1/1+np.exp(-(np.matmul(w.T,X))+b)

cost=-((np.dot(Y,np.log(A)))+(np.dot((1-Y),np.log(1-A))))/m

dw=np.matmul(X,((A-Y).T))

db=np.sum(A-Y )

output:

ValueError Traceback (most recent call last)

in

3 X = np.array([[1., -2., -1.], [3., 0.5, -3.2]])

4 Y = np.array([[1, 1, 0]])

----> 5 grads, cost = propagate(w, b, X, Y)

6

7 assert type(grads[“dw”]) == np.ndarray

in propagate(w, b, X, Y)

32 # YOUR CODE STARTS HERE

33 A=1/1+np.exp(-(np.matmul(w.T,X))+b)

—> 34 cost=-((np.dot(Y,np.log(A)))+(np.dot((1-Y),np.log(1-A))))/m

35

36 # YOUR CODE ENDS HERE

<**array_function** internals> in dot(*args, **kwargs)

ValueError: shapes (1,3) and (1,3) not aligned: 3 (dim 1) != 1 (dim 0)

please help to write code and any sujjestions