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 – Visualization is 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+. For optional 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. 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.1.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.1.0
File Size Uploaded Provenance Actions
panchi-3.1.0.tar.gz 78.9 kB Without provenance Details for panchi-3.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 175.2 kB

Release files / panchi-3.1.0.tar.gz

Download URL panchi-3.1.0.tar.gz
Size 78.9 kB
Tags Source
SHA-256 checksum
How to use checksums
12ae9758e6487820041cdeffd252d7c52dbff0d6519b572adc601402c6cdcf94
BLAKE2b-256 checksum
How to use checksums
bb375f12ec6c7e27240bc88c5b9b8261dfc21be591a7ff2e699accaf42e8c57f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

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

Download URL panchi-3.1.0-py3-none-any.whl
Size 96.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb0f56bb753d1817f6553e3c66afd774c87b9671df814f37360094ae03f03c25
BLAKE2b-256 checksum
How to use checksums
7faf0ed3b2280311f1e7ba9b5dfef73fd7cb176cffed70f85ac881a6ac78928a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for panchi 3.1.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