Skip to content
haiderali.dev
activev0.0.3

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-math

capabilities

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.

ChapterTopicStatus
Ch 2Linear Algebradone
Ch 3Analytic Geometryplanned
Ch 4Matrix Decompositionsplanned
Ch 5Vector Calculusplanned
Ch 6Probabilityplanned
Ch 7Statisticsplanned
Ch 8Optimizationplanned
Ch 9Dimensionsplanned

quick start

Up and running

example.py
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/False

stack

Built with

C++17pybind11CMakescikit-build-coreCatch2uv