Skip to main content

Python linear algebra liabrary

Project description

python-la : Python linear algebra v=0.97.0

introduction

The aim of this project is to implement programatically all of the mathematical operations you can in linear algebra, and more so - to implement themt in such a way that it will be written programmatically as close to mathematically as possible

How to install

pip install python-la

Examples

>> from python_la import Matrix, Span, Vector, PolynomialSimple, LinearMap, RealField, VectorSpace

>> Matrix([[1,2],[3,4]]).gaussian_elimination()
---------
| 1 | 0 |
---------
| 0 | 1 |
---------

>> Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]).characteristic_polynomial
X^3 - 15X^2 - 18X

>> Matrix([[1, 0, 1],[0, 1, 1]]).kernel
[-1, -1, 1]

>> v1, v2 = Vector([3, 4]), Vector([4, 5])
>> Span([v1,v2]).to_orthonormal()
[0.6, 0.8]
[0.8, -0.6]

>> R2 = RealField(2)
>> V = VectorSpace(R2)
>> lm = LinearMap(V, V, lambda vector: Vector([0, vector[0]], R2))
>> x_squared = PolynomialSimple.from_string("x^2")
>> plus_1 = PolynomialSimple.from_string("x+1")
>> v = V.random()
>> P = plus_1(x_squared)
>> P
X^2 + 1
>> P(lm)(v) == v
True

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

python-la-0.97.0.tar.gz (34.0 kB view details)

Uploaded Source

File details

Details for the file python-la-0.97.0.tar.gz.

File metadata

  • Download URL: python-la-0.97.0.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for python-la-0.97.0.tar.gz
Algorithm Hash digest
SHA256 bd299f40cecf429d00ef2200d1eb629cdeda38b00222f98b97a4383310565c5b
MD5 f06f9596f81be6f55f075596f112519a
BLAKE2b-256 880ab2b43d0ea506f571e73d2efb931cae06beb7f64f2c21571e35e0f62a649a

See more details on using hashes here.

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