Skip to content

Restore missing 'import matplotlib as mpl' in mix_model font block#174

Merged
mmcky merged 1 commit into
mainfrom
fix/mix-model-mpl-import
Jul 19, 2026
Merged

Restore missing 'import matplotlib as mpl' in mix_model font block#174
mmcky merged 1 commit into
mainfrom
fix/mix-model-mpl-import

Conversation

@mmcky

@mmcky mmcky commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

The CJK font-configuration block in lectures/mix_model.md calls mpl.font_manager.fontManager.addfont(...) but the import matplotlib as mpl line is missing, so the lecture fails execution with NameError: name 'mpl' is not defined whenever it is re-executed (confirmed in the 2026-07-18 cache-rebuild execution reports).

This is the same residual class field-validated in QuantEcon/action-translation#107 (partial font-block drops). mix_model was triaged I18N_ONLY in the resync wave — content-equivalent to source, so no wave PR covers it — which is how a broken font block slipped past: triage checks content equivalence, not executability.

One line restores the import, matching the canonical font block used across the repo.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 18, 2026 23:21
@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit 4845129
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/6a5c0a9771045f000804146d
😎 Deploy Preview https://deploy-preview-174--astonishing-narwhal-a8fc64.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores the missing import matplotlib as mpl line in the CJK font-configuration block of lectures/mix_model.md, fixing a runtime NameError when the lecture notebook is executed.

Changes:

  • Add import matplotlib as mpl before the mpl.font_manager.fontManager.addfont(...) call in lectures/mix_model.md.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request July 18, 2026 23:38 Inactive
@mmcky
mmcky merged commit 4bb2d78 into main Jul 19, 2026
8 checks passed
@mmcky
mmcky deleted the fix/mix-model-mpl-import branch July 19, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants