When to use np.dot

Yes, that’s right. Prof Ng chooses to stack the transposed w vectors as the rows of the W weight matrices for NNs. This is explained in the lectures and in this other thread, which I think I already linked above.