Fast matrix transforms
Project description
matvec
A domain-specific language for fast graph shift operations. This implements mathematical fields on numbers, n-dimensional column vectors, and n-by-n sparse matrices.
License: Apache Software License
Author: Emmanouil (Manios) Krasanakis
Dependncies: ---
:zap: Quickstart
Creating a 5-dimensional vector:
from matvec import Vector
x = Vector([1, 2, 3, 4, 5])
Creating a 5x5 sparse matrix A in coo-format with non-zero elements A[1,2]=9 and A[3,0]=21
from matvec import Matrix
A = Matrix([1, 2],
[3, 0],
[9, 21],
5)
Print the outcome of matrix-vector multiplication:
print(A*x)
Print the outcome of left-multiplying transpose(x) with A:
print(x*A)
:fire: Features
:rocket: Parallelized matrix-vector multiplication.
:chart_with_downwards_trend: Memory reuse optimization.
:mag: numpy compatibility.
:factory: Common arithmetic operations.
:volcano: Benchmark
Current benchmark values are exhibited only on one machine. More rigorous evaluation will take place in the future.
Task | numpy/scipy | matvec |
---|---|---|
Allocate vectors with 2E6 elements | 0.101 sec | 0.106 sec |
1000 temp. additions with 2E6 elements | 4.067 sec | 2.265 sec |
Allocate matrix with 2E6 non-zeros | 0.231 sec | 0.073 sec |
Sparse matrix with vec multiplication | 0.024 sec | 0.012 sec |
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 Distributions
Built Distribution
Hashes for matvec-0.0.7-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89020483b24c49816ed7f7d7c7c033eb0f4c7a1496747db2ccacf3061a4f4494 |
|
MD5 | b60f7287b32d837215f9010f68be7c12 |
|
BLAKE2b-256 | 8d7f17fba14cf46ac69d50dd03b233e17b843398fe4d8d346e65703a5140ce55 |