Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[arellano] Simplify probability computations #149

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

TaichiSakaguchi
Copy link
Contributor

Simplify probability computations.

@jstac
Copy link
Contributor

jstac commented Nov 3, 2023

Thanks @TaichiSakaguchi . I'll run the workflow and we'll get back to you.

@mmcky
Copy link
Contributor

mmcky commented Dec 14, 2023

@mmcky
Copy link
Contributor

mmcky commented Dec 14, 2023

thanks @TaichiSakaguchi this looks more concise.

@jstac the plots look the same between the current live site and the preview build.

From my perspective I am not sure if this improves the readability of the code as it is combining two operations into a single line. I am usually in favour of more lines as I find it typically a bit "easier" to understand (as a reader).

@oyamad
Copy link
Member

oyamad commented Dec 14, 2023

If one wants to write it with two lines:

default_states = v_c[B_idx, :] < v_d
delta = P[y_idx, default_states].sum()

But this looks redundant to me...

@jstac
Copy link
Contributor

jstac commented Dec 14, 2023

Thanks @TaichiSakaguchi

@jstac jstac merged commit 561448a into QuantEcon:main Dec 14, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants