From 484512918092fd3715dfe748cd80669994810c1a Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Sun, 19 Jul 2026 09:21:40 +1000 Subject: [PATCH] Restore missing 'import matplotlib as mpl' in mix_model font block The CJK font-configuration block uses mpl.font_manager but the import line was dropped, so the lecture fails execution with NameError under cache rebuilds (found via the 2026-07-18 execution reports; same residual class as QuantEcon/action-translation#107). mix_model was triaged I18N_ONLY in the resync wave so no wave PR covers it. Co-Authored-By: Claude Fable 5 --- lectures/mix_model.md | 1 + 1 file changed, 1 insertion(+) diff --git a/lectures/mix_model.md b/lectures/mix_model.md index feeb623e..76c7ad27 100644 --- a/lectures/mix_model.md +++ b/lectures/mix_model.md @@ -116,6 +116,7 @@ $$ :hide-output: false import matplotlib.pyplot as plt +import matplotlib as mpl FONTPATH = "fonts/SourceHanSerifSC-SemiBold.otf" mpl.font_manager.fontManager.addfont(FONTPATH) plt.rcParams['font.family'] = ['Source Han Serif SC']