Skip to content

Commit 9853faf

Browse files
authored
Merge branch 'main' into copilot/fix-407
2 parents 7f0a848 + 77a5f1f commit 9853faf

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77
- pip
88
- pip:
99
- jupyter-book==1.0.4post1
10-
- quantecon-book-theme==0.9.1
10+
- quantecon-book-theme==0.9.2
1111
- sphinx-tojupyter==0.3.1
1212
- sphinxext-rediraffe==0.2.7
1313
- sphinx-exercise==1.0.1

lectures/jax_intro.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,18 @@ for A in matrices:
274274
print(A)
275275
```
276276

277-
One point to remember is that JAX expects tuples to describe array shapes, even for flat arrays. Hence, to get a one-dimensional array of normal random draws we use `(len, )` for the shape, as in
277+
To get a one-dimensional array of normal random draws, we can either use `(len, )` for the shape, as in
278278

279279
```{code-cell} ipython3
280280
random.normal(key, (5, ))
281281
```
282282

283+
or simply use `5` as the shape argument:
284+
285+
```{code-cell} ipython3
286+
random.normal(key, 5)
287+
```
288+
283289
## JIT compilation
284290

285291
The JAX just-in-time (JIT) compiler accelerates logic within functions by fusing linear

0 commit comments

Comments
 (0)