Skip to main content

A simple and efficient module for matrix and vector manipulation.

Project description

matmath module

A simple and efficient module for matrix manipulation.

Downloads


Installing under Python

When installing the matmath module for python, it is recommended that you check if you have python 3.6 or above. To install matmath, goto a terminal and run:

pip install matmath

To upgrade matmath, run:

pip install --upgrade matmath

Functions and their uses

The Matrix and Vector classes support all mathematical operations like addition, subtraction, multiplication, division, matrix multiplication, etc. Apart from that, the Matrix class also supports the following functions:

Matrix related functions

Functions Description
.adjoint() Returns the adjoint of the matrix.
.adj() Alias of .adjoint()
.cofactor() Returns the cofactor of the matrix.
.copy() Returns a copy of the matrix.
.cut() Returns a smaller matrix by removing the required row and column. The default of row and column is None.
.determinant() Returns the determinant of the matrix (if mathematically possible).
.det() Alias of .determinant().
.inverse() Returns the inverse of the matrix (if mathematically possible) multiplied by the multiplication factor.
.inv() Alias of .inverse().
.is_diagonal() Tells if input is a diagonal matrix.
.is_identity() Tells if input is an identity matrix.
.is_lower_triangular() Tells if input is a lower triangular matrix.
.is_null() Tells if input is a null matrix.
.is_skew_symmetric() Tells if input is a skew symmetric matrix.
.is_square() Tells if input is a square matrix.
.is_symmetric() Tells if input is a symmetric matrix.
.is_upper_triangular() Tells if input is an upper triangular matrix.
.order() Returns the order of the matrix as a tuple of the form (rows, columns).
.rotate() Returns a matrix which is formed by rotating the given matrix, n times, in clockwise sense.
.trace() Returns the trace of the matrix, if mathematically possible.
.transpose() Returns the transpose of the matrix.
identity() Returns an identity matrix of order N x N multiplied by the multiplication factor.
zero() Returns a null matrix of order N x M. If only 1 parameter is given returns a null matrix of order N x N.

Vector related functions

Method Description
argument Returns the argument of the vector.
cross_product Cross product of the vector with respect to another vector.
dot_product Dot product of the vector with respect to another vector.
is_parellel Tells whether the two vectors are parellel or not.
is_unit Tells whether the vector is a unit vector or not.
magnify Magnifies a vector.
modulus Returns the modulus of the vector.
rotate Rotates the 2d vector in 2D space.
unit_vector Returns the unit vector in the direction of the vector.
x Returns the 1st component of the vector.
y Returns the 2nd component of the vector.
z Returns the 3rd component of the vector.

Contact

Please feel free to reach out if you have any questions:


License

MIT License

Copyright (c) 2021 Siddhesh-Agarwal

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

matmath-3.0.0rc2.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

matmath-3.0.0rc2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file matmath-3.0.0rc2.tar.gz.

File metadata

  • Download URL: matmath-3.0.0rc2.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for matmath-3.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 a2af332196b7d5991d45adfb5f85c4cb76106d218cadf05ef42f8090546ee29c
MD5 980b57a86b00696a0b0c2c272cc53541
BLAKE2b-256 e7c751c3b5ab5ebeab2dcbb725eb2f62ee5ca2c977e7d835bfa7b132a58de0ea

See more details on using hashes here.

File details

Details for the file matmath-3.0.0rc2-py3-none-any.whl.

File metadata

  • Download URL: matmath-3.0.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for matmath-3.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 686bea9f96416cffd1e0f2d66b91f8320ff05c2e3d8bc3ca47c323b7aa8e3bba
MD5 cc85044d8d040ee21be59828679f5f8d
BLAKE2b-256 01ce64fda9c369408cbecce39291c98b7e0a879140ef83c80cce57afede74f79

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