def _expon_solve_lam_from_mu(mu, b):
def lam_eq(lam, mu, b):<EOL><INDENT>lam, mu, b = Decimal(lam), Decimal(mu), Decimal(b)<EOL>return ( (<NUM_LIT:1> - (lam*b + <NUM_LIT:1>) * np.exp(-lam*b)) /<EOL>(lam - lam * np.exp(-lam*b) + Decimal(<NUM_LIT>)) - mu )<EOL><DEDENT>return optim.brentq(lam_eq, -<NUM_LIT:100>, <NUM_LIT:100>, args=(mu, b), disp=True)<EOL>
For the expon_uptrunc, given mu and b, return lam.
Similar to geom_uptrunc