Using Pandas within Pymc3 context?

Hi Chris,

I just faced another issue that maybe only related to theano: One of my groupby task was implemented by the following code:


zzdat_matrix = tt.zeros((len(GroupId3), 4), dtype=T.config.floatX)

for index,group in enumerate(GroupId3):
    sub_group = yydat_matrix[tt.all(tt.eq(yydat_matrix[:,[0,1,2]].astype('float32'), group), axis = 1)]
    bx = tt.sum(beta[(sub_group[:,3].astype('int32'))-1]*sub_group[:,4])
    tt.set_subtensor(zzdat_matrix[index,[0,1,2]], group)  
    tt.set_subtensor(zzdat_matrix[index,3], bx)

But it will run forever without any error. Then I found out that maybe there is something wrong with the sub_group because if i tried sub_group[0], it gave me the error that index is out of bound. But i dont see anything wrong with my boolean indexing here for yydat_matrix.

To have a quick recap, yydat_matrix is a symbolic matrix with 5 columns, GroupId3 is a numpy array with shape 3xn, since tt.eq works element-wise, i need to add a tt.all after that.

Do you have any idea what’s going wrong here? Thanks!

Best,
Fan