Skip to content

Correct typos in GMM error messages#78

Merged
francois-rozet merged 2 commits into
probabilists:masterfrom
shuofengzhang:fix-gmm-unknown-error-typos
Mar 8, 2026
Merged

Correct typos in GMM error messages#78
francois-rozet merged 2 commits into
probabilists:masterfrom
shuofengzhang:fix-gmm-unknown-error-typos

Conversation

@shuofengzhang
Copy link
Copy Markdown
Contributor

@shuofengzhang shuofengzhang commented Mar 8, 2026

What changed

  • Fixed two typoed ValueError messages in GMM.initialize from Unkown to Unknown.
  • Added regression tests to ensure invalid strategy and invalid covariance type both raise the correctly spelled messages.

Why

  • Error messages are part of the public debugging surface. Correct spelling improves clarity and professionalism.
  • Regression tests prevent these user-facing messages from regressing in future refactors.

Testing

  • source .venv/bin/activate && pytest -q (162 passed)

Copy link
Copy Markdown
Member

@francois-rozet francois-rozet left a comment

Choose a reason for hiding this comment

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

Hi @shuofengzhang, thank you for noticing the typo and submitting a fix. I am happy with the fix, but would like to rename the tests slightly.

Comment thread tests/test_mixtures.py Outdated
Comment thread tests/test_mixtures.py Outdated
@francois-rozet francois-rozet self-requested a review March 8, 2026 14:29
@francois-rozet francois-rozet changed the title fix: correct typo in GMM unknown-* error messages Correct typos in GMM error messages Mar 8, 2026
@francois-rozet francois-rozet merged commit 00d08b8 into probabilists:master Mar 8, 2026
7 checks passed
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