proper theano chi2 with c code