Skip to main content

A Python-native linear algebra library for learning, experimentation, and visual intuition

Project description

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

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


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.3.1b1.tar.gz (37.6 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.3.1b1-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file panchi-0.3.1b1.tar.gz.

File metadata

  • Download URL: panchi-0.3.1b1.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for panchi-0.3.1b1.tar.gz
Algorithm Hash digest
SHA256 3a7e30bc25d68aa29310f8af462c920332ae6977907bd59d00ff2e92cb669f6d
MD5 f6d1a3d7f9becb30acc32877c6ce3530
BLAKE2b-256 4d16b0b17448ba09dc08e6aebe1264300c2c1d60e862717c16a095215d460d10

See more details on using hashes here.

File details

Details for the file panchi-0.3.1b1-py3-none-any.whl.

File metadata

  • Download URL: panchi-0.3.1b1-py3-none-any.whl
  • Upload date:
  • Size: 43.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for panchi-0.3.1b1-py3-none-any.whl
Algorithm Hash digest
SHA256 3af07b579c63ecd9898994f31621f09899d13ea82647ae038ee22872e03c7e72
MD5 6edf2b6c76fcfdf077ea749b85249257
BLAKE2b-256 e3c96ee6dc82fef581da4862bd3522fbf564e04ca003358b175b68e7a24bd16e

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