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: numpy
: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.11-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d632e03ed8c70942f5d8bc3ef37d464352accc831a952509e9cea5a9b4df3594 |
|
MD5 | f87bd163f6160188eaa9355d54fa1ab9 |
|
BLAKE2b-256 | bfbc602eadf2933c496ed1a3f776c87ac2e1d77eef88aadf446f0046f0ba0da8 |