def _expand_table(table):
    return np.repeat([[1, 1], [1, 0], [0, 1], [0, 0]], table.ravel(), axis=0)
expand a 2 by 2 contingency table to observations
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/stats/tests/test_nonparametric.py/_expand_table