Skip to content

Commit 69b1c59

Browse files
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 543f47e commit 69b1c59

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lectures/numba.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Numba 在运行时将函数编译为本地机器码指令。
7575

7676
此外,Numba 还可以完成其他有用的技巧,例如 {ref}`多线程 <multithreading>` 或通过 `numba.cuda` 与 GPU 进行交互。
7777

78-
Numba 的 JIT 编译器在许多方面与 JULIA 中的 JIT 编译器类似。
78+
Numba 的 JIT 编译器在许多方面与 Julia 中的 JIT 编译器类似。
7979

8080
主要区别在于它的目标更为保守,只尝试编译语言的一个较小子集。
8181

@@ -170,7 +170,7 @@ time3 = timer3.elapsed
170170
```
171171

172172
```{code-cell} ipython3
173-
time1 / time3 # Calculate speed gain
173+
time1 / time3 # 计算速度提升倍数
174174
```
175175

176176
### 工作原理与适用场景
@@ -367,11 +367,11 @@ def h(w, r=0.1, s=0.3, v1=0.1, v2=1.0):
367367
Updates household wealth.
368368
"""
369369
370-
# Draw shocks
370+
# 抽取冲击
371371
R = np.exp(v1 * np.random.randn()) * (1 + r)
372372
y = np.exp(v2 * np.random.randn())
373373
374-
# Update wealth
374+
# 更新财富
375375
w = R * s * w + y
376376
return w
377377
```

0 commit comments

Comments
 (0)