Haven't looked into this extensively, but can `g_stat` and/or `g_fit` be removed in favor of functionality in `scipy.stats`? For example, these two functions reference the G-test in their documentation:

http://docs.scipy.org/doc/scipy-0.13.0/reference/generated/scipy.stats.chi2_contingency.html#scipy-stats-chi2-contingency

http://docs.scipy.org/doc/scipy-dev/reference/generated/scipy.stats.power_divergence.html#scipy.stats.power_divergence