workspace, scipy, oop_intro: three small fixes

未關閉 適合新手
#657 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
83/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
markdown, numpy, python
領域
documentation

研究方向

閱讀引用段落中提到的三個講義檔案:lectures/workspace.md、lectures/scipy.md 和 lectures/oop_intro.md。根據提供的 SciPy 版本歷史核對措辭,並在上下文中檢視選用解答;關於 sympy.md 和 Numba 的要點已在正文中處理。完成標準是套用要求的文字與風格修改,接著檢查受影響的講義段落是否一致。

由索引模型根據 Issue 內容生成。

描述

Three small things found while these lectures were reviewed on their way into the shared lecture pool (QuantEcon/lectures#43). None is urgent. Line numbers are at e2d28d0.

  • lectures/workspace.md, line 77: "write to to a file" should read "write it to a file".
  • lectures/scipy.md, the note on NumPy symbols (lines 68 and 85): the two version numbers disagree, and neither matches SciPy's history. The excerpt is scipy/__init__.py as it stood up to SciPy 1.3: from numpy import * is still there at v0.15.1, v1.0.0 and v1.3.3. SciPy 1.4.0 kept those names in its namespace but deprecated them, and SciPy 1.12.0 removed them. So "scipy < 0.15.1" could read "SciPy before 1.12 (deprecated from 1.4)", and "(1.15+)" could read "(1.12+)".
  • lectures/oop_intro.md, the solution at line 399 (optional): callable(eval(f'True.{attribute}')) could be callable(getattr(True, attribute)), which says what it does. The eval is harmless here, since the names come from dir(bool), and the comment above it suggests it is deliberate, so this is only a matter of style.

The same review raised factorial(n-r) in the MLE exercise of sympy.md, which #652 already reports. It also called compute_max_numba_parallel in numpy_vs_numba_vs_jax.md a data race, but it is not one: Numba treats m = max(m, z) in a prange loop as a reduction, and on 12 threads, 600 repeated runs and 200 shuffled grids all matched the serial result.

When these land here, the pool picks them up through its nightly refresh.

主要語言
JavaScript
星號
73
分支
34
平均合併
28 分鐘
30 天內合併 PR
5

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

QuantEcon/lecture-python-programming 的其他 Issue

查看 QuantEcon/lecture-python-programming 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。