Matrix Operations on Data Arrays
Project description
Table of Contents
DataMat
Matrix Operations on Data Arrays. A pandas-friendly toolkit that wraps rich matrix algebra primitives in DataFrame/Series-aware containers (DataMat, DataVec).
Features
- Drop-in replacements for many
numpymatrix operations that preserve pandas metadata. - Helpers for aligning MultiIndex structures and constructing dummy variables from categorical sources.
- A
DataVec~/~DataMatAPI that mirrors pandas while adding linear-algebra conveniences (projection, leverage, SVD, etc.).
Repository Layout
src/datamat/ Core source code (DataMat, DataVec, utilities)
docs/ Historical literate notebooks and design notes
tests/ Unit tests
scripts/ Development tooling (e.g., pre-push hook)
Getting Started
-
Install Python 3.11 (e.g., via pyenv) and Poetry (https://python-poetry.org/docs/).
-
Create and initialise the virtual environment:
poetry env use 3.11 poetry install --with dev # optional extras, e.g. lsms, can be added via `poetry add` -
Run the quality gates and test suite:
poetry run ruff check . poetry run black --check . poetry run mypy src tests poetry run pytest # or simply make check
Development Workflow
- Contribution guidelines: CONTRIBUTING.org
- Agent-specific policies: AGENTS.org
- Pre-push automation:
ln -s ../../scripts/pre-push.sh .git/hooks/pre-push
Documentation
The historical literate source from the original Metrics Miscellany project lives in docs/metrics_miscellany.org. It remains the best place to reference derivations and design notes. Current development happens directly in the Python modules under src/datamat/; augment the Org materials when adding new capabilities.
Online Docs
Rendered documentation generated by MkDocs is available at https://ligon.github.io/DataMat/.
Optional Dependencies
- Robust Stata ingestion relies on
lsms.tools.from_dta. Install thelsmspackage if you plan to calldatamat.read_stata.
License
The project continues under the original license; see LICENSE.txt.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datamat-0.2.0a1.tar.gz.
File metadata
- Download URL: datamat-0.2.0a1.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.11.2 Linux/6.6.76-08174-g2f3b34fb3650
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f85fc9b23946aad365f07d95dd381f287429d89523dd104b72623d580d1cf4d
|
|
| MD5 |
f14d8296e7d5974e58f50b6a420b7cb6
|
|
| BLAKE2b-256 |
3fa5a19831a7d6269dd1a82802b8166e0a2db22ec6fd82c91f078e4066ebd6c9
|
File details
Details for the file datamat-0.2.0a1-py3-none-any.whl.
File metadata
- Download URL: datamat-0.2.0a1-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.11.2 Linux/6.6.76-08174-g2f3b34fb3650
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
706744d6101742b485135073163fb0cd6c886b7c5ac4608141fd49e80f436837
|
|
| MD5 |
ca225e3152d36d61ee841153d578f2ef
|
|
| BLAKE2b-256 |
abfd1ad7290fd83914ff68005bb9b2ad28f6cac2ef539b673a8c35a01baeff90
|