Matrix and Vector Manipulation library
Project description
Matrix7
a library in pure python3 that allows you to use matrices and vectors easily
Setup
sudo pip install matrix7
How to use
Declarations
from matrix7 import Matrix, Vector
a = Matrix([
[1,2,3,4,5,6,7],
[101,102,103,104,105,106,107],
[201,202,203,204,205,206,207],
])
b = Vector( [2,4,7,9] )
c = Vector( [2,4,7,9] , transpose = True )
printing
print(a):
| 1.00 2.00 3.00 4.00 5.00 6.00 7.00 |
| 101.00 102.00 103.00 104.00 105.00 106.00 107.00 |
| 201.00 202.00 203.00 204.00 205.00 206.00 207.00 |
print(b):
| 2.00 |
| 4.00 |
| 7.00 |
| 9.00 |
print(c):
| 2.00 4.00 7.00 9.00 |
properties
a.size # (nb lines, nb cols)
a.trace # only for nxn matricies
a.raw # matrix or vector in normal python list format
a.gravity # only for vectors
operations
- normal python operations are used
- Matrix or Vector object is returned
- regular matrix/vector calculation rules apply
c = a + b
c = a - b
c = a * b
trasponse of matrix or vector
a.transpose()
generation
# vector containing 6 threes
vect = Vector.gen(6, 3)
# 3x4 matrix of zeroes
mat = Matrix.gen(3, 4, 0)
navigation
# matrix line 0 (Vector) or vector element (int, float ..etc)
a[0]
# matrix column 0 (Vector)
a(0)
# matrix element (0,0) (int, float ..etc)
a[0][0]
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
matrix7-1.2.0.tar.gz
(3.1 kB
view details)
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
matrix7-1.2.0-py3-none-any.whl
(15.5 kB
view details)
File details
Details for the file matrix7-1.2.0.tar.gz.
File metadata
- Download URL: matrix7-1.2.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb13b69a41f64cb71acf6c6e17db791ce7744ce550bb683beb57aa53ca3e93c6
|
|
| MD5 |
c512b1160cddd05b2f1a4b7ccf49469a
|
|
| BLAKE2b-256 |
b400918da74dbe2bc6d70df526f780501bbee310b86ba19fd0ee1cbdb2443975
|
File details
Details for the file matrix7-1.2.0-py3-none-any.whl.
File metadata
- Download URL: matrix7-1.2.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d586a17cd3d5e3cba56c7d4308206846444b4eb80c9b07dea06f6471f2d8163
|
|
| MD5 |
fef9e2fbbe088775f89cc04366b5e6ae
|
|
| BLAKE2b-256 |
4411846fe7c1d2104abeed8f87cc46dea5c3409266854b47841993ab20610d07
|