Shape error when making out-of-sample predictions

There was a bug (unrelated to the problems I mentioned) in feature_test.

This is the “new” version of it.

def feature_test_2(x,N,M):
    idx = np.arange(M)
    matrix  = np.tile(idx, (N.eval(),1))
    a = x[:, np.newaxis]*matrix
    return pm.math.sin(a)

I recon that if I can write the first two lines of it in pytensor, all problems would be solved? All the variables would be symbolic and there would be no need to carry ‘N’ around. I don’t know how to do that though without using numpy, which forces to use N.eval()