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.0, 0.0, 20.0, 43.0], [22.0, 25.0, 1.0, 0.0, 0.0, 31.0, 71.0], [9.0, 7.0, 1.0, 0.0, 0.0, 18.0, 140.0]]
    assert_array_equal(self.res1.pred_table(), pred)

dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/discrete/tests/test_discrete.py CheckMNLogitBaseZero.test_pred_table/original