adding python binding to compute chi2