feat(linalg): F2 declare from GFM table and lecture example
Add la.declare for batch MatrixSymbol from @-record tables, ship examples/linalg-transpose, and mark formula-doc F2 done. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b2401b8458
commit
f3c49e86ae
12 files changed
+123
-8
No files matched your search
@@ -21,6 +21,23 @@ Narration: \((AB)^\top = B^\top A^\top\). The identity is checked by running thi
|
||||
2. *
|
||||
> print text=identity-fail
|
||||
|
||||
`shapes` =
|
||||
|
||||
| @ | name | rows | cols |
|
||||
|---|------|------|------|
|
||||
| 1 | X | 2 | 2 |
|
||||
| 2 | Y | 2 | 2 |
|
||||
|
||||
*`env` = > la.declare table=`shapes`*
|
||||
*`X` = env[^X]*
|
||||
*`Y` = env[^Y]*
|
||||
*`S` = `X` + `Y`*
|
||||
*`st` = > la.ascii expr=`S`*
|
||||
1. `st` == "X + Y"
|
||||
> print text=declare-ok
|
||||
2. *
|
||||
> print text=declare-fail
|
||||
|
||||
*`raw` = > la.ascii expr=`Pt` raw=True*
|
||||
1. `raw` == "(A*B)^T"
|
||||
> print text=raw-ok
|
||||
|
||||
+1
-1
@@ -2474,7 +2474,7 @@ fn ext_linalg_doc_smoke() {
|
||||
assert!(status.success(), "failed to build marqdo_plugin_linalg");
|
||||
assert_out(
|
||||
"tests/ext/linalg-doc-smoke.mq.md",
|
||||
"B^T*A^T\nidentity-ok\nraw-ok",
|
||||
"B^T*A^T\nidentity-ok\ndeclare-ok\nraw-ok",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user