You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Revert import jax.random as jr in jv and career to spelled-out jax.random #986
with no alias. The jr alias was in the manual at one point and was deliberately removed in QuantEcon.manual#76, "Refactor JAX random example".
The alias is nonstandard.np and jnp are community conventions a reader arrives already knowing. jr is not — it is local to these two files. A reader who meets jr.split several hundred lines below the import has to scroll back to the top of the lecture to work out what it means. Our lectures are read linearly and often in fragments, so an alias that only pays off for the author is a net cost to the reader.
Affected call sites
lectures/jv.md — import at line 48, uses at 210, 485, 490.
lectures/career.md — import at line 60, uses at 399, 409, 415, 423, 427, 491, 503, 508, 519.
These are the only two files in the repo using the alias.
Related
QuantEcon/action-style-guide rule qe-jax-006 still shows import jax.random as jr together with jr.PRNGKey(42) as its recommended example. That is stale relative to the manual on two counts: the alias, and PRNGKey, which the manual now tells us to replace with jax.random.key. Worth fixing at the source so the checker stops recommending it in other lecture repos.
Activity