Vecta
Computational Math for ML
A computational maths library for machine learning, built from scratch in C++17 with Python bindings — chapter by chapter after Mathematics for Machine Learning.
Install
pip install vecta-mathcapabilities
What it does
C++17 Header-Only Core
Zero external math dependencies. Every operation — matrix multiply, decompositions, solvers — built from scratch.
Python Bindings
pybind11 bindings give you a native Python Matrix class with numpy-style indexing, slicing, and negative indices.
Dimension Checking
Full dimension validation with informative ValueError on mismatches. No silent shape bugs.
Follows Mathematics for ML
Chapter-by-chapter implementation after the book — linear algebra, analytic geometry, decompositions, calculus, probability, optimization.
Published on PyPI
Installable via pip. scikit-build-core + CMake build system with Catch2 for testing.
roadmap
Chapter by chapter
Following Mathematics for Machine Learning — each chapter implemented from scratch in C++17.
| Chapter | Topic | Status |
|---|---|---|
| Ch 2 | Linear Algebra | done |
| Ch 3 | Analytic Geometry | planned |
| Ch 4 | Matrix Decompositions | planned |
| Ch 5 | Vector Calculus | planned |
| Ch 6 | Probability | planned |
| Ch 7 | Statistics | planned |
| Ch 8 | Optimization | planned |
| Ch 9 | Dimensions | planned |
quick start
Up and running
import vecta
# Create matrices
A = vecta.Matrix([[1, 2], [3, 4]])
B = vecta.Matrix([[5, 6], [7, 8]])
# Operations
C = A @ B # matrix multiply
T = A.transpose() # transpose
I = vecta.eye(3) # identity
# Check properties
A.is_symmetric() # True/Falsestack