In this particular case, there was no need at all for the reshaping, and the result could have been achieved with just:
Z = Y @ X W = np.c_[Z, Z]