Skip to main content

Vecta

A computational maths library for ML, built from scratch in C++ with Python bindings. The long-term goal is to work chapter-by-chapter through Mathematics for Machine Learning (Deisenroth, Faisal, Ong), implementing every concept myself instead of reaching for a library.

Current state

The linear-algebra core is up and running as a header-only C++ template library, exposed to Python through a single pybind11 module:

  • Matrix — row-major dense matrix with numpy-style construction and indexing
  • matmul, add, scalar_mul — arithmetic (with dimension checking)
  • transpose, identity / eye, is_symmetric

C++ test suites are planned but not written yet.

Stack

  • C++17 header-only core (no external maths dependencies — everything implemented from scratch)
  • pybind11 for Python bindings (fetched via CMake FetchContent)
  • scikit-build-core + CMake for packaging
  • uv for the Python venv and all package installs (no pip commands)

Layout

include/vecta/linalg/        C++ headers (header-only core)
    matrix.hpp               Matrix<T> class
    core.hpp                  matmul, add, scalar_mul, transpose, identity, is_symmetric
src/bindings.cpp             pybind11 binding code (module `_vecta`)
python/vecta/                Python package wrapper (imports `_vecta`)
examples/                    scratch space for worked examples from the book
tests/cpp/                   Catch2 tests (planned)
tests/python/                pytest tests (planned)

Dev workflow (uv-based, no pip)

Create the venv and install the package in editable mode:

uv venv
source .venv/bin/activate
uv pip install -e . --no-build-isolation

Rebuild + reinstall the Python module after changing C++ code:

uv pip install -e . --no-build-isolation

Install

pip install vecta-math

Usage

import vecta as vt

A = vt.array([[1, 2], [3, 4]])    # numpy-style construction
B = vt.zeros((2, 2))              # vt.ones((r, c)), vt.eye(n) too
A.shape                           # (2, 2)
A[0, 1]                           # read element; A[0, 1] = 9 writes (negative indices work)
A.T                               # transposed copy

C = vt.matmul(A, B)               # dimension mismatch -> ValueError
D = vt.add(A, B)
E = vt.scalar_mul(A, 2.0)
print(vt.transpose(C))
print(vt.is_symmetric(A))

Roadmap

Follow the book chapter by chapter, folding each topic into include/vecta/<chapter>/, src/bindings.cpp, and python/vecta/:

Topic Book chapter Status
Linear Algebra Ch 2 — Linear Algebra Matrix + core ops
Analytic Geometry Ch 3 — Analytic Geometry not started
Matrix Decompositions Ch 4 — Matrix Decompositions not started
Vector Calculus Ch 5 — Vector Calculus not started
Probability and Distributions Ch 6 — Probability and Distributions not started
Continuous Optimization Ch 7 — Continuous Optimization not started
Linear Regression Ch 9 — Linear Regression not started
Dimensionality Reduction (PCA) Ch 10 — Dimensionality Reduction not started
Density Estimation (GMM) Ch 11 — Density Estimation not started
Classification (SVM) Ch 12 — Classification not started

Download files

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

Source Distribution

vecta_math-0.0.3.tar.gz (6.5 kB view details)

Uploaded Source

Built Distributions

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

vecta_math-0.0.3-cp314-cp314-manylinux_2_39_x86_64.whl (84.0 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.39+ x86-64

vecta_math-0.0.3-cp313-cp313-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

vecta_math-0.0.3-cp313-cp313-musllinux_1_2_i686.whl (1.2 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ i686

vecta_math-0.0.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (83.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

vecta_math-0.0.3-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl (109.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ i686

vecta_math-0.0.3-cp312-cp312-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

vecta_math-0.0.3-cp312-cp312-musllinux_1_2_i686.whl (1.2 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ i686

vecta_math-0.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (83.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

vecta_math-0.0.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (109.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686

vecta_math-0.0.3-cp311-cp311-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

vecta_math-0.0.3-cp311-cp311-musllinux_1_2_i686.whl (1.2 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ i686

vecta_math-0.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (85.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

vecta_math-0.0.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (110.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686

vecta_math-0.0.3-cp310-cp310-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

vecta_math-0.0.3-cp310-cp310-musllinux_1_2_i686.whl (1.2 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ i686

vecta_math-0.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (83.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

vecta_math-0.0.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (109.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686

vecta_math-0.0.3-cp39-cp39-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

vecta_math-0.0.3-cp39-cp39-musllinux_1_2_i686.whl (1.2 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ i686

vecta_math-0.0.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (83.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

vecta_math-0.0.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (109.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ i686

File details

Details for the file vecta_math-0.0.3.tar.gz.

File metadata

  • Download URL: vecta_math-0.0.3.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.12

File hashes

Hashes for vecta_math-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8c7e0be77f2d154aa38a7901374a6dadeb79087d2d55a59b67d7c067922f7b40
MD5 e467ecbe74d00939bc9fc96211f7f1ef
BLAKE2b-256 8df9c27a7ef11bc260a56b1eafde6ed6446551106335e31a056c83571810b0ed

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp314-cp314-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp314-cp314-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 6d646bf6eeba7a526897bdc36aa03eb9e5822a67b452fe50db4904f9f72a2f9f
MD5 edd8dc4e00d1a957bfd5c78db9cead1c
BLAKE2b-256 727039421b2555e3b336f3641afb2924c48b89167d9fd34c5c1fc54f04e92c7a

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 40b2088d751fa4a7d2278213753e48ba3946631500da42505d31fbb59f9a10ef
MD5 61f2fc70cd6d2d070e13d8b3fd14e1cb
BLAKE2b-256 4c8bf6106d4f4afb024747695fbe10d23d05c90f860c0e082003ba56fbde4f39

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp313-cp313-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 a3da99c9fb9ce9f8eccf318b8d82c8bfba7b6d883f4c2d13b0199e084d8b2182
MD5 bad4f211aa95433aa55c2c6d44fa0f85
BLAKE2b-256 72c7fd576571423e8483e6a4a5a422d100b810936d6e2c72aed89136f792652b

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7db76dce3e12add2cd495ec0f1e4f61d02b1c0fbf6c735d2f332f9a4d8319b05
MD5 8ff46f10d8ad2c8bb75368bb6689fca8
BLAKE2b-256 a346a270c97ace18fff62e2d52645f3e5ca1d2bc80d923ad5fb3ee2f2bb69b00

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 ee2813354bf89db9b9de1d0982c7ce2cefde395de2771b02cbd64fe6acaecc24
MD5 2beaa4a5c3ceb7996b333c837880101b
BLAKE2b-256 7a65a6cad3effec73b5bce3a2c18c15aa33eaefcd818181cdc5fe48033810d01

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2719441a59ca5affab3a6717683ddade7a647a62841d5363b9e215910f19a9f8
MD5 5e6804c200b82a4744c68872378276e2
BLAKE2b-256 e23edf80ed75369d495a55d43b5d08fab28cbefacff83c8075d9729a7980eadd

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 93d7024df95a468a11d1ec6ab4dca109cc0217e82a1819cc12fabd49944352f9
MD5 231c7b2c91626d3cf391cf6b87737ed8
BLAKE2b-256 6f911cbaa127a6ce6f6bbea7d983688a00673bc80d093544c970fbf9f90c7679

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 088710ebef0827bc0d4046635492e66f99aabc63a79413d37a1492837bd36ab4
MD5 1967b5d81418018709484015f93525ee
BLAKE2b-256 a07a3664852a02cb434820eddef0d0a22a9a4ec0198dca98073dcac83c7e3e05

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b1fe2eedd2e4f7dae79107e785a4b0b21e6f7b095412cdb236d299081a817c55
MD5 75d2cf045a46ce4c3f4189384dc9ce1d
BLAKE2b-256 38c821a17f8660df8f3eb7953ed256a7c0069ae8e462659e92faf80c1dfd9274

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 929c933e0e732c14587e9658b40c0afb0e67513fc108f4961c011ded165b1838
MD5 9ac20e44363f302f3097ab6bf91290b7
BLAKE2b-256 af10d276d2af297d018fa9fe9878ac5ee54fe0e140875f1d08ca86592dec6086

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 31a172fcef8c255dcc5a3528c0f168a46194128cadfb032cee09280df80184c4
MD5 460093ed8bbc8f91ea743ea96a7584f8
BLAKE2b-256 3a5f7b180836eb1a2f8de9b41ae6ec7baa69fa0f6f9ca8761c87eb38afd50be7

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8fd97c77fd36f289e6723cd48da3b71eef358ad5d1bc308cc8fc18ce719fa2f5
MD5 2d022cbce02a8a0b89525fb8edbc52d1
BLAKE2b-256 15b8ba5ef925f820b58cfa83cabfb7e16969b596574a3b12082433ca15a0f0aa

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b3c3ad8b21bc23aa5a5710457a8685923b77c9ba6d0ef72a1d9b356820020862
MD5 9c1c3f40c84a68b8e12c32b1d30c2754
BLAKE2b-256 aa1cc8860cc5d6e1830f8f4fd7d1a08d919098f9bfe3577a98d10f43403994a8

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 48d25a8b9bb05eaf2585967a9611ef573c7b75064fbb3a90c2a13e69fb4baa4e
MD5 ea237b20b9dbc86ef6920edc5ac2e2f9
BLAKE2b-256 f58a337d452ebcca7a961991ef3770fa2e358e2ac7e2be90072016fa527cc1b8

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp310-cp310-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp310-cp310-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 c0f74faba6b1c0e24c6131dc2c43799fd5552dd4acbf6c0bd32a261917f0239d
MD5 b7041be752b350dfa82e0b85e44ba864
BLAKE2b-256 3502cf6f00c4d2358f1f06ae5cc0256731bc7fe53686a8c99bc1b7de46ab167f

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b5df2aa02815d8c76ddde37dd7732c582ea3aa33e26b7a4ca48efeb8ec5ab158
MD5 57b852bf59dcd9d9c03d3e135c1a5ee6
BLAKE2b-256 08770cfdc391277360a79577d5d4a2b84fa0f5cdd9dc3d1f746777354e1907f2

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 0a678b0fa46600c1ef14d05732a537062dd00ba23828cf57cfb0079e6c117fcc
MD5 b924e26b888e877ec30202352bd60975
BLAKE2b-256 f83e0a491ab4b169733dab735e61148d3a9d4cd1ee87e2bd01105f568fbdd05c

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8a98c593055c971d765d2b95408ca13a10b18b8a0fd7331430c5efe24833fcb7
MD5 32d967ef20223c769fb625beda1cc62a
BLAKE2b-256 6bd8aa2e4368b8c34fff4c7cb9f1d0d3c8c15d2f71fdc3afa58e93e1ffba5ca3

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp39-cp39-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp39-cp39-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 cd9d2bf920b416d5d08b47d832a3d162127f507692ff38c895e5bdddf0fa643b
MD5 67d0a1cdc5fe63e491a4375013b68bbb
BLAKE2b-256 bd0c50a25ff9e307d924bedfb015e28f26f055b004ed2eb45bdff436a6b6c0da

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 83ffaad82636ad03fc3b764d07c31191a9a24ad00c144331681fd6c06a065189
MD5 f5538fb8a20f9f10dd4df83f14062dec
BLAKE2b-256 4968703269dba449439915c2100f8fb88240572b218a8a8dfea02e38ddbcc367

See more details on using hashes here.

File details

Details for the file vecta_math-0.0.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for vecta_math-0.0.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 20d915abf67cd11c849ca83c4cbee71d871db1e3c1d0bdf7c31b8a3321cc620d
MD5 ce2ab44e0da08b1d11f758c35505f2f6
BLAKE2b-256 d9658a23b58f0a1fdb05682f66798f18c98c63c05731532481aae585b8a5e582

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.3 This release

22 files

0.0.2

2 files

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page