A Python-native linear algebra library for learning, experimentation, and visual intuition
Project description
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.
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
- Explicit over implicit – Algorithms are implemented directly, not delegated to opaque backends
- Readable over clever – Code prioritizes clarity and educational value over terse optimizations and pythonisms
- Mathematical over computational – Objects behave like mathematical entities with proper operator overloading
- Visual by default – Visualization is a first-class feature, not an afterthought
- 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
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.
Project details
Release history Release notifications | RSS feed
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 panchi-0.3.0b1.tar.gz.
File metadata
- Download URL: panchi-0.3.0b1.tar.gz
- Upload date:
- Size: 36.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0477b3a200754955c8a18dc22db6f7e42536f5faded8bcd047a4cd4f2ca091cc
|
|
| MD5 |
f2fb1aafe45414af87933e35008c876b
|
|
| BLAKE2b-256 |
84a341df36770b67c64537558f905b1a93592f94f53623f58711bcd5d9e7cbe1
|
File details
Details for the file panchi-0.3.0b1-py3-none-any.whl.
File metadata
- Download URL: panchi-0.3.0b1-py3-none-any.whl
- Upload date:
- Size: 42.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf941ae0ab06498da90846d8601b8030f828998f0d86103e72b3114a96bc0e48
|
|
| MD5 |
7f723d9f2e082ee631fed38cb2824339
|
|
| BLAKE2b-256 |
baaa56605f3a1ab7483dacc05fb79f1eb51399c4e31178cbcb14fa0adeef92b1
|