Skip to main content

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]

Metadata

Release files for matrix7 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matrix7 1.2.0
File Size Uploaded
matrix7-1.2.0.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for matrix7 1.2.0
File Interpreter ABI Platform
matrix7-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.6 kB

Release files / matrix7-1.2.0.tar.gz

Download URL matrix7-1.2.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
eb13b69a41f64cb71acf6c6e17db791ce7744ce550bb683beb57aa53ca3e93c6
BLAKE2b-256 checksum
How to use checksums
b400918da74dbe2bc6d70df526f780501bbee310b86ba19fd0ee1cbdb2443975
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / matrix7-1.2.0-py3-none-any.whl

Download URL matrix7-1.2.0-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d586a17cd3d5e3cba56c7d4308206846444b4eb80c9b07dea06f6471f2d8163
BLAKE2b-256 checksum
How to use checksums
4411846fe7c1d2104abeed8f87cc46dea5c3409266854b47841993ab20610d07
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page