Skip to main content

Marimo notebook helpers for geometric algebra — t-string powered LaTeX rendering

Project description

galaga-marimo

Marimo notebook helpers for geometric algebra — t-string powered LaTeX rendering.

Requires Python 3.14+ for t-string support.

Usage

import galaga_marimo as gm

gm.md(t"""
# Example

Rotor: {R}
Vector: {v}
""")

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).name(r"\uparrow")
d = (e1 * e2).name(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 .name(latex=...) — pass any collection (list, tuple, dict) of named multivectors.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

galaga_marimo-1.7.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

galaga_marimo-1.7.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file galaga_marimo-1.7.2.tar.gz.

File metadata

  • Download URL: galaga_marimo-1.7.2.tar.gz
  • Upload date:
  • Size: 9.7 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

Hashes for galaga_marimo-1.7.2.tar.gz
Algorithm Hash digest
SHA256 7e73c3a5a47f264d9e7def107b5e9ff412aec3a43b04090cf17500dbf241756a
MD5 f068b2bf3f40223ba5c742f68e1c6ed4
BLAKE2b-256 2a03e63ef7fad83b1bf7b6e87f38eee1d73bc76973877b62eaf36a148eaefbf2

See more details on using hashes here.

File details

Details for the file galaga_marimo-1.7.2-py3-none-any.whl.

File metadata

  • Download URL: galaga_marimo-1.7.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 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

Hashes for galaga_marimo-1.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f4e0b364c36b05268a3a1fed87e254db037c3cb95f8314f315e616547a7df75
MD5 9931ff959e41606d0e2cf59176069c63
BLAKE2b-256 31767e6eae1be7093b5b2053795cdcefc215b5dab666d509ac08fc72f9dfa92e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page