A simple linear algebra package written in vanilla python3
Project description
# linalg
[![PyPI version](https://badge.fury.io/py/linalg.svg)](https://badge.fury.io/py/linalg)
A simple linear algebra package written in pure Python3.
## What is this?
NOT intended to be the best or fastest.
NOT intended to be production-grade (yet).
IS intended to be fully vanilla python3.
IS meant as an educational tool.
## Usage
This package provides the Matrix class and utility functions.
import linalg from linalg import * # import the Matrix class and utility functions top-level from linalg import Matrix # import the Matrix class
To create a matrix object, initialize it with a 2D list or use Matrix.zeroes() or Matrix.identity(). You can also use random_matrix().
mat = Matrix([[3, 4, 5], [2, 5, -1], [0, 2, 1]]) # 3x3 matrix mat = Matrix.zeroes(4, 2) # 4x2 zero matrix mat = Matrix.identity(4, 4) # 4x4 identity matrix mat = random_matrix((2, 3), (-10, 10)) # 2x3 matrix with elements within (-10, 10)
After that, you can use multiple functions within the Matrix class to perform linear algebraic operations.
## Todo
[] Properly implement random_matrix()
[] Add other linear algebraic operations
[] Implement vectors
[] Add documentation
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
File details
Details for the file linalg-0.1.1.tar.gz
.
File metadata
- Download URL: linalg-0.1.1.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 422318a7ccf302004bc8620c6b1789673024d7edecccdc62ba136fcb9aa11870 |
|
MD5 | 5e5d375c03c531d28bed0b4143e21265 |
|
BLAKE2b-256 | b451999a80295734927226f79c8dc4dda04195b84428a0f70da5acb5c260a025 |