This release is a pre-release and may not be stable for production use.
galaga-marimo
Marimo notebook helpers for geometric algebra — t-string powered LaTeX rendering.
Requires Python 3.14+ for t-string support.
galaga itself remains Python 3.11+. The t-string requirement belongs only to
this optional adapter package.
During the Galaga 2 prerelease train:
python -m pip install --pre "galaga-marimo>=2.0.0a1,<3"
Usage
import galaga_marimo as gm
gm.md(t"""
# Example
Rotor: {R}
Vector: {v}
Derivation: {v:expr}
Concrete coefficients: {v:value}
""")
The ordinary interpolation path uses the object's public .latex() protocol.
The :name, :expr, :value, and :full format specifications select
Galaga facade content while keeping Marimo's inline/block layout independent.
Recognizing Known Values
When computed results are numerically equal to named multivectors (e.g.
eigenstates, basis elements), use recognize= to annotate them:
from galaga import Algebra
alg = Algebra(2)
e1, e2 = alg.basis_vectors()
u = alg.scalar(1.0).named("up", latex=r"\uparrow")
d = (e1 * e2).named("down", latex=r"\downarrow")
knowns = [u, d]
result = alg.scalar(1.0)
gm.md(t"Result: {result}", recognize=knowns)
# renders: Result: $1 \quad (\equiv \uparrow)$
The Doc builder also supports it:
with gm.doc(recognize=knowns) as d:
d.md(t"g₊(↓) = {g_plus(d)}")
d.md(t"g₋(↓) = {g_minus(d)}")
Labels are taken from each MV's immutable .name value, created with
.named(..., latex=...). Pass any collection (list, tuple, or dict) of named
multivectors.
Interactive visualizations are intentionally separate from this t-string
renderer. Install galaga-anywidget and import galaga_anywidget.viz for the
persistent 2D CGA widget.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file galaga_marimo-2.0.0a2.tar.gz.
File metadata
- Download URL: galaga_marimo-2.0.0a2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6aae6dad8718047eaeef11857cdf21bc4a0370fd456d5cae31387255f3bf6c2b
|
|
| MD5 |
2155f2dad5859ce13a69dc5cc1e12220
|
|
| BLAKE2b-256 |
8bb54ca18e2b73b1be65a4b427bf508327c566ace5301ec72fd1f0dd5d18fb0c
|
File details
Details for the file galaga_marimo-2.0.0a2-py3-none-any.whl.
File metadata
- Download URL: galaga_marimo-2.0.0a2-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
122936f8a5c60fe6df134fde151e1a68de57de6bc1df87f714f1c80cf78d2a9f
|
|
| MD5 |
d6065bd6151147c7ebe9e72c38f960aa
|
|
| BLAKE2b-256 |
e33b4666bc31f48a39ba7de3cf3d8eb1abf9b09cfb2dca5b98bb7b9b29496a6b
|