workspace, scipy, oop_intro: three small fixes

Offen Anfängerfreundlich
#657 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
83/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
markdown, numpy, python
Bereich
documentation

Rechercherichtung

Lies die drei genannten Vorlesungsdateien an den angegebenen Abschnitten: lectures/workspace.md, lectures/scipy.md und lectures/oop_intro.md. Prüfe die Formulierung anhand der bereitgestellten SciPy-Versionsgeschichte und sieh dir die optionale Lösung im Kontext an; die Punkte zu sympy.md und Numba sind im Haupttext bereits behandelt. Erledigt ist die Aufgabe, wenn die gewünschten Text- und Stiländerungen vorgenommen und anschließend die betroffenen Vorlesungspassagen auf Konsistenz geprüft wurden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
JavaScript
Sterne
73
Forks
34
Ø Merge
28 Min.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus QuantEcon/lecture-python-programming

Alle Issues in QuantEcon/lecture-python-programming

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.