linear algebra in your console
Project description
linacon
Linear algebra in your Console — yayo!
linacon runs in your terminal and provides a set of linear algebra commands. All operations are performed using NumPy.
Status: sections [0]–[4] of the Feature roadmap are implemented and reachable from the CLI — basic matrix operations, property checks, rotations, factorizations and least squares, all backed by NumPy in src/linacon/core. I/O beyond headerless CSV (section [5]) is still a roadmap.
Usage
Requires Python >= 3.14, NumPy and PyArrow.
Every feature is reached as <command> <feature>, loading its matrices from CSV files:
pip install linacon
# multiply two matrices
python -m linacon.main bmo matmul -f A.csv -g B.csv
# LU decomposition, written to CSV
python -m linacon.main factorization lu -f A.csv -out lu.csv
# ridge least squares (lambda via -k)
python -m linacon.main least-squares regularized -f A.csv -g b.csv -k 1.0
Use python -m linacon.main <command> <feature> --help to list a feature's flags.
I/O
You can set stdin and stdout to use files, pipes, or both in powerful combinations.
Loading Pipeline
The loader delegates parsing to PyArrow's pyarrow.csv.read_csv, configured for headerless numeric CSV: autogenerated column names, internal multi-threaded parsing, and no quoting/escaping for speed. The resulting Arrow table columns are stacked with np.column_stack into the final 2D NumPy array. See run.
Argument Parser
The parser is split by command (bmo, checks, rotation, factorization, least-squares), and each command exposes one sub-command per feature — every feature is reached through a command, never by direct access. Shared flags come from parent parsers: -f/--file (primary matrix), -g/--file2 (second operand), -k/--scalar, -b (start-to-end benchmark) and -out/--out (CSV output path). See get_argparse.
Output
When -out is given, the operation's result is written back as headerless CSV via PyArrow (loader-compatible). Multi-part results (e.g. P/L/U from a factorization, or the transform and transformed points from a rotation) are written one file per component as <stem>.<name><suffix>. See write_csv.
Feature
[0] Basic Matrix Operations
- [0.1] matrix mul (arbitrary dimensions)
- [0.2] matrix sum
- [0.3] matrix scalar mul
- [0.4] scalar dot product
- [0.5] scalar sum
- [0.6] inverse compute
- [0.7] transpose compute
- [0.8] rank compute
[1] Checks
- [1.1] invertability check
- [1.2] vectors independence check
- [1.3] vectors orthogonality check
- [1.4] symmetric check
- [1.5] triangular check
- [1.6] positive definite check
[2] Rotations
- [2.1] rotation matrix computation (input: matrix, angle, [axis], [center], [scale], [shear], [perspective])
[3] Factorization
- [3.1] gauss-jordan elimination
- [3.2] LU decomposition
- [3.3] LDU decomposition
- [3.4] QR decomposition
- [3.5] Cholesky decomposition
- [3.6] orthogonal decomposition
- [3.7] SVD
- [3.8] eigenvalue decomposition
[4] Least Squares
- [4.1] least squares
- [4.2] weighted least squares
- [4.3] least squares with regularization
- [4.4] regularization
- [4.5] linear regression
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 linacon-0.1.2.tar.gz.
File metadata
- Download URL: linacon-0.1.2.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ddf4e0aeac53ec39d709cdadd54dd0b41d84d56b0b9287a0e58f0bee20e6fb0
|
|
| MD5 |
5fd453607a401dac88d6aee4b595b4d2
|
|
| BLAKE2b-256 |
bed04e77528af09dccc25ed756662c73147b024972fca4a90318fd5f88cad0ae
|
File details
Details for the file linacon-0.1.2-py3-none-any.whl.
File metadata
- Download URL: linacon-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67879067bcc12514e5b8ad81a50627e6731a9df4389d0ea4b43fa3050855e27b
|
|
| MD5 |
0a1249d6e1566420957ba3c9146d015d
|
|
| BLAKE2b-256 |
6062f3ad66619d3d76344add7ac65f2ba745f9b443db95987ab78fa18d4a4b7e
|