Skip to main content

A library that deals with matrix and vector operations.

Project description

Matrixlib

NOTICE

"rank" and "inverse" functions are a work in progress, they DO NOT WORK.


A basic library for matrix and vector operations. Any feedback is highly encouraged. I enjoy trying to create modules and programs that work with mathematical functions and data. I also like looking into higher end modules and researching the processes and programs they use to perform tasks. Any feedback will be taken and acted upon.



Installation


Use the package manager pip to install matrixlib_jfj.

Release Versions:

pip install matrixlib_jfj

Test Versions:

pip install -i https://test.pypi.org/simple matrixlib-jfj


General Usage


import matrixlib_jfj as ml

# matrix = ml.matrix.Matrix(rowcols=(x, y) or values=[[nested list(s) with values assigned]]) Initialises the matrix.
Example:
matrix = ml.matrix.Matrix(rowcols=(3, 3))
>>> [[0, 0, 0], [0, 0, 0], [0, 0, 0]]

print(matrix)
    +-       -+
    | 0  0  0 |
>>> | 0  0  0 |
    | 0  0  0 |
    +-       -+

# matrix.random(a, b) Adds random values to the entire matrix
Example:
matrix.random(1, 10)
    +-          -+
    |7    10   7 |
>>> |1    1    7 |
    |10   5    8 |
    +-          -+

# matrix.identity() Creates an identity matrix from an existing square matrix
    +-       -+
    |1   0   0|
>>> |0   1   0|
    |0   0   1|
    +-       -+

### Adding ###
matrix1 = ml.matrix.Matrix(values=[
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
])

matrix2 = ml.matrix.Matrix(values=[
    [9, 8, 7],
    [6, 5, 4],
    [3, 2, 1]
])

    +-          -+
    |10   10   10|
>>> |10   10   10|
    |10   10   10|
    +-          -+


Updates


Update 0.0.7

Added "get_submatrix" function that gets the submatrix of any square matrix, added the "det" function which gets the determinant of a square matrix.


Update 0.0.8

Fixed bug where an external program would run when the user of the package would run their own program.

Update 0.0.81

Updated README file to reflect certain information.

Update 0.0.82

Fixed Type Annotations.

Update 0.1.82

Removed Deprecations, Removed functionality in utils.py (Temporary) added better typing, improved cumsum function.

Update 0.1.90

Added temporary base case to Matrix.rank() function.

Contributing


Any and All feedback and help is highly encouraged. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License


GNU General Public License v3.0

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

matrixlib_jfj-0.2.5.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matrixlib_jfj-0.2.5-py2.py3-none-any.whl (20.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file matrixlib_jfj-0.2.5.tar.gz.

File metadata

  • Download URL: matrixlib_jfj-0.2.5.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for matrixlib_jfj-0.2.5.tar.gz
Algorithm Hash digest
SHA256 ceeed2b5568d3b299c52fd3618d5af8bae68ecd39b5e30b4d93b5aaf79c64426
MD5 cdddebb83d05ef5fa1a54f5d5366b1e4
BLAKE2b-256 91e68ddf4ea177a3aa6d817d428fa9191c21c6aa91653edda99642452386d718

See more details on using hashes here.

File details

Details for the file matrixlib_jfj-0.2.5-py2.py3-none-any.whl.

File metadata

  • Download URL: matrixlib_jfj-0.2.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for matrixlib_jfj-0.2.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a16c8f251db1b3942b05d9aa8944ce970aa376da5eec0aa1fb5df13b6b97edf6
MD5 2b3206ca73f3021261353618ed7dd728
BLAKE2b-256 64756236692fbba93306d05370ed2bfee33ea81301241f54e71eee1d84e63a58

See more details on using hashes here.

Supported by

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