Just `dot(a, v[:, i] = w[i] *  v[:, i]` should do here. With broadcasting the simpler form `dot(a, v) = v * w` also works.but may be more confusing.