Skip to main content

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


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)

Uploaded Source

Built Distribution

lineargebra-0.2-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page