When we are talking about a single data sample we use x_n or in this case x. We express single data samples as column vectors of shape (D x 1). Our weights w is also a column vector of shape (D x 1). When we are multiplying a single data sample with the weights, we have to take the transpose of w.
When we talk about the whole dataset we use the notation X. This is a matrix of size (N x D).
The function we implement takes the whole data X of shape (N, D) (this is what the .shape would actually return in python) and multiplies it by the weights vector of shape (D,). Therefore we do Xw.
I hope this is clear.
Best,
Sena