Skip to main content
panchi

panchi

panchi is a Python-native linear algebra library designed for learning, experimentation, and visual intuition.

The goal is not performance. The goal is clarity.

TestCI PyPI version Python 3.10+ License: MIT Code style: black

Why panchi?

Most linear algebra libraries optimize for speed and abstraction. panchi optimizes for understanding.

panchi is built for students who want to see the math happen, educators who need transparent implementations, and anyone who has ever wondered what linear algebra is actually about.

Think of it as a lab, not a production engine.


Philosophy

  1. Explicit over implicit: Algorithms are implemented directly, not delegated to opaque backends
  2. Readable over clever: Code prioritizes clarity and educational value over terse optimizations and pythonisms
  3. Mathematical over computational: Objects behave like mathematical entities with proper operator overloading
  4. Visual by default: Visualizations are a first-class feature, not an afterthought
  5. Informative errors: Error messages guide learning by explaining what went wrong and why

Installation

pip install panchi

Requires Python 3.10+. And for optional (but very pretty) Manim-powered visualizations:

pip install panchi[manim]

A Taste

import panchi as pan
from panchi.algorithms import rref, solve

# Vectors and matrices behave like their mathematical counterparts
A = pan.Matrix([[1, 2, 3], [2, 5, 7], [0, 1, 2]])
b = pan.Vector([1, 0, 0])

# Solve Ax = b — see the status, not just the answer
result = solve(A, b)
print(result.status)    # 'unique'
print(result.solution)  # the solution vector x

# Row reduction shows every step it takes
reduction = rref(A)
print(reduction)        # full step-by-step walkthrough
print(reduction.rank)   # 3

See what a matrix does to the plane:

from panchi.visualizations import Animator2D

animator = Animator2D()
animator.animate_transform(pan.Matrix([[0, -1], [1, 0]]))  # 90° rotation

The same tools work in three dimensions via Animator3D: vectors, spans, and 3x3 transformations in R³.


Documentation

Full documentation, user guides, and the API reference are available at https://gustavo-galvao-e-silva.github.io/panchi/


Contributing

panchi welcomes contributions that align with its educational mission. See CONTRIBUTING.md for guidelines. The deepest thanks to all of our contributors, whose names can be found in CONTRIBUTORS.md.


License

MIT License – see LICENSE for details.


Acknowledgments

panchi is inspired by Gilbert Strang's Introduction to Linear Algebra and 3Blue1Brown's Essence of Linear Algebra, resources that make the subject visible, not just computable.

Metadata

Release files for panchi 3.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for panchi 3.3.0
File Size Uploaded Provenance Actions
panchi-3.3.0.tar.gz 96.3 kB Without provenance Details for panchi-3.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for panchi 3.3.0
File Interpreter ABI Platform Actions
panchi-3.3.0-py3-none-any.whl Python 3 none any Details for panchi-3.3.0-py3-none-any.whl

Total release size: 212.7 kB

Release files / panchi-3.3.0.tar.gz

Download URL panchi-3.3.0.tar.gz
Size 96.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d11a8a6a4bc84acbd8c3d056832122516a96ad4f164f99e049ee3370f4996cec
BLAKE2b-256 checksum
How to use checksums
101414d37135c9fa023a06c69e841e1f4f46573bc45dd203ec9096df24581677
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / panchi-3.3.0-py3-none-any.whl

Download URL panchi-3.3.0-py3-none-any.whl
Size 116.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5946b77036cbccb960421535dd390f4bfbc3b59f1fde9c0e6950cdebf819ce4
BLAKE2b-256 checksum
How to use checksums
ca19203843c23f913db22fd2b6fb8354d7cb7df4819689dbddc7295d3df71fa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for panchi 3.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page