Avoiding looping when using GP prior on latent variables

Ah, my mistake then. You could also do

gamma_iw = tt.repeat(gamma[None ,:], len(I), axis=0) 

and that should give you the (I,W) matrix. The trick here is to create the extra dimension with length 1 using the None slice.