Skip to content

Fix simplify crash, add zoo hint, expand linalg subcommands#26

Merged
sacchen merged 1 commit into
mainfrom
feat/v030-reliability-and-linalg
Apr 11, 2026
Merged

Fix simplify crash, add zoo hint, expand linalg subcommands#26
sacchen merged 1 commit into
mainfrom
feat/v030-reliability-and-linalg

Conversation

@sacchen

@sacchen sacchen commented Apr 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Closes Calling simplify on unsupported types #16: Guard simplify() with isinstance(parsed, sympy.Basic) — prevents Atom._eval_simplify() crash when a bare helper name like S or d is evaluated
  • Zoo hint: Print hint: zoo = complex infinity; the expression is undefined (e.g. division by zero) when result is zoo, so users aren't left with an opaque symbol
  • Linalg expansion (v0.3.0): Add linalg det, inv, rank, eig, nullspace subcommands alongside existing solve and rref; update :linalg help, README reference table, and diagnostics hint text
  • CI: Add linalg det smoke install check

Test plan

  • All 279 tests pass (uv run --group dev pytest)
  • Coverage at 97% (+1.5pp from baseline), cli.py at 98% (+5pp)
  • 9 new integration tests in test_cli.py
  • 6 new unit tests in test_cli_unit.py covering _evaluate_linalg_alias branches and _execute_expression zoo hint path

🤖 Generated with Claude Code

Bug fixes:
- Guard simplify() with isinstance(parsed, sympy.Basic) to prevent
  Atom._eval_simplify() crash when a bare name like S or d is evaluated
  (closes #16)
- Add post-result hint when value is zoo (complex infinity), so users
  understand division-by-zero results rather than seeing an opaque symbol

Linalg expansion (v0.3.0):
- Add linalg det/inv/rank/eig/nullspace subcommands to _evaluate_linalg_alias
- Update :linalg help text and README reference table with new subcommands
- Update diagnostics hint to list all available linalg subcommands
- Add smoke install check for new linalg subcommand in CI

Coverage: 97% (+1.5pp), cli.py 98% (+5pp)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sacchen sacchen merged commit 8722e1f into main Apr 11, 2026
10 checks passed
@sacchen sacchen deleted the feat/v030-reliability-and-linalg branch April 11, 2026 07:07
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.

Calling simplify on unsupported types

1 participant