You are saying that the right hand side of that assignment statement produces two output values, but it clearly doesn’t. That is why that error is thrown.
Now the question is how to fix it. Rather than manually implementing the linear activation at that point in the code, you have already built a function to do that, right? Notice also that it returns two values. Hmmmmm.
The answer is the same as I gave earlier on this thread: why manually implement things at this level? You already have built linear_forward for performing the operation of the first line that you show, right?
in linear_activation_forward(A_prev, W, b, activation)
22 # A, activation_cache = …
23 # YOUR CODE STARTS HERE
—> 24 Z, linear_cache = linear_forward(W, A_prev, b)
25 A, activation_cache = activation(Z)
26 # YOUR CODE ENDS HERE
in linear_forward(A, W, b)
18 # Z = …
19 # YOUR CODE STARTS HERE
—> 20 Z = np.dot(W, A) + b
21
22 # YOUR CODE ENDS HERE
<array_function internals> in dot(*args, **kwargs)
ValueError: shapes (3,2) and (1,3) not aligned: 2 (dim 1) != 1 (dim 0)