def test_mnl_simulate(dm, fit_coeffs, num_alts, test_data, choosers_dm):
    # check that if all the alternatives have the same numbers
    # we get an even probability distribution
    data = np.array(
        [[10 ** (x + 1) for x in range(len(dm.columns))]] * num_alts)

    probs = mnl.mnl_simulate(
        data, fit_coeffs, num_alts, returnprobs=True)

    npt.assert_allclose(probs, [[num_alts / 1] * num_alts])

    # now test with real data
    probs = mnl.mnl_simulate(
        choosers_dm.as_matrix(), fit_coeffs, num_alts, returnprobs=True)
    results = pd.DataFrame(probs, columns=test_data['sim_expected'].columns)
    results, expected = results.align(test_data['sim_expected'])
    npt.assert_allclose(results.as_matrix(), expected.as_matrix(), rtol=1e-4)
dataset/ETHPy150Open UDST/urbansim/urbansim/urbanchoice/tests/test_mnl.py/test_mnl_simulate/swapped operands of `/`