Skip to main content

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.

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

Documentation

Full documentation, user guides, and the API reference are available at panchi.readthedocs.io (coming soon)


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


Download files

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

Source Distribution

panchi-0.2.0a1.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

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

panchi-0.2.0a1-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

Details for the file panchi-0.2.0a1.tar.gz.

File metadata

  • Download URL: panchi-0.2.0a1.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for panchi-0.2.0a1.tar.gz
Algorithm Hash digest
SHA256 29e1243c4e50d61583f96b03f4e68debd2078f17c7b2a7a5e24194fd0f4cb438
MD5 d20ea487d1a20ad33ba01bd2dcc8c949
BLAKE2b-256 c9c05af545cd38902052358dc47d4013477e91e39cf473d6c72cfe4b91d4f310

See more details on using hashes here.

File details

Details for the file panchi-0.2.0a1-py3-none-any.whl.

File metadata

  • Download URL: panchi-0.2.0a1-py3-none-any.whl
  • Upload date:
  • Size: 37.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for panchi-0.2.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 8fa61911bb1bfaac31f917f1e9cd771f715745c31aaf1d15b84690357aae9d9a
MD5 8d183452e22ebc7e1fb708d4956a9316
BLAKE2b-256 5ed2737a8dd1d027c38c2abd1ac2504222eab656c819a5848aafb30a9d7f16af

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