A math implementation of Vectors and Matrix
Project description
lineargebra
My simple implementation of Vectors & Matrix to python, with maths nerd stuff.
Installation
pip3 install lineargebra
Usage Example
Vector (Vector2D and 3D works pretty much the same)
from lineargebra import Vector
ex_vector = Vector((1, 2, 3, 4))
ex_vector2 = Vector((4, 3, 2, 1))
ex_vector + ex_vector2 # output : Vector(5; 5; 5; 5)
ex_vector - ex_vector2 # output : Vector(-3; -1; 1; 3)
ex_vector * 2 # output : Vector(2; 4; 6; 8)
ex_vector * ex_vector2 # output : 20
ex_vector.inverted() # output : Vector(4; 3; 2; 1)
ex_vector.inverted() == ex_vector2 # output : True
# and others...
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
lineargebra-0.2.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for lineargebra-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 098ef74912ac265db587a1dde62426bef45fe7218c3c2ecb3e05333220213f52 |
|
MD5 | bdea9f02391394d3106ef1de86e46179 |
|
BLAKE2b-256 | f22210362dc6b447478db7057a9b64b60ce8ac16b6cc54c51c9ec4b7a8a33075 |