Problems with Linear Discriminant Analysis Classifier
As you say; it has something to do with the shape of the matrices. In this case, you have matrices in the same of (155,2) - whereas it's expecting them to be of (310, 1).

Try looking into the shape of each matrix as you transform them (tip: insert a print statement wherever a transformation occurs); and make sure everything stays consistent.

Also, can you provide us with more information, such as exactly where this error occurs? It looks to be an issue with the dot product.