Skip to main content

Matrix Operations on Data Arrays

Project description

* 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 ~numpy~ matrix operations that preserve pandas metadata.
- Helpers for aligning MultiIndex structures and constructing dummy variables from categorical sources.
- A ~DataVec~/~DataMat~ API that mirrors pandas while adding linear-algebra conveniences (projection, leverage, SVD, etc.).

** Repository Layout
#+begin_example
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)
#+end_example

** Getting Started
1. Install Python 3.11 (e.g., via pyenv) and Poetry (https://python-poetry.org/docs/).
2. Create and initialise the virtual environment:
#+begin_src bash
poetry env use 3.11
poetry install --with dev
# optional extras, e.g. lsms, can be added via `poetry add`
#+end_src
3. Run the quality gates and test suite:
#+begin_src bash
poetry run ruff check .
poetry run black --check .
poetry run mypy src tests
poetry run pytest
# or simply
make check
#+end_src

** Development Workflow
- Contribution guidelines: [[file:CONTRIBUTING.org][CONTRIBUTING.org]]
- Agent-specific policies: [[file:AGENTS.org][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 the =lsms= package if you plan to call =datamat.read_stata=.

** License
The project continues under the original license; see =LICENSE.txt=.

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

datamat-0.2.1.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

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

datamat-0.2.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file datamat-0.2.1.tar.gz.

File metadata

  • Download URL: datamat-0.2.1.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.12 Linux/6.6.99-09000-gd3ae1caecf39

File hashes

Hashes for datamat-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e0ac371b256990071bcabb8959c4c488d6d3014d8daba246c9dfe56f74d748ac
MD5 0370114e98d12b1a4c8e36cbc9103011
BLAKE2b-256 6805e05bf608dca2d9e99d047ac858ecab6e8a76792e61fe7319035d7d71420f

See more details on using hashes here.

File details

Details for the file datamat-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: datamat-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.12 Linux/6.6.99-09000-gd3ae1caecf39

File hashes

Hashes for datamat-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3abe734e67334915fd02bd9a894d094b7678874d6730586cfc37148a0b81d55e
MD5 d65513099eaae5a4b137e9dca640a6f4
BLAKE2b-256 d1ba7725cd33ad0c1b3d578491cfc23e344355effd10492f830b2cb023f85eac

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