Matrix Operations
Project description
matops
is a Python package to perform basic matrix operations.
Examples:
Addition:
from matops import Matrix
m1 = Matrix(
[
[1, 2],
[3, 4],
]
)
m2 = Matrix(
[
[5, 6],
[7, 8],
]
)
m3 = m1 + m2
print(m3)
[[6, 8], [10, 12]]
You can use prettify()
method to print it in a more readable format.
m3.prettify()
[6, 8]
[10, 12]
Transpose:
from matops import Matrix
m = Matrix(
[
[1, 2],
[3, 4],
]
)
m.transpose().prettify()
[1, 3]
[2, 4]
List of available methods in Matrix
class:
prettify()
transpose()
is_row_matrix()
is_column_matrix()
is_rectangular_matrix()
is_square_matrix()
is_zero_matrix()
is_symmetric_matrix()
is_skew_symmetric_matrix()
is_diagonal_matrix()
is_scalar_matrix()
is_identity_matrix()
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
matops-0.1.3.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for matops-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd61ff042056a494dbbcf4fc234f53b8c725b9fdfc655cc780d0764f7f86536b |
|
MD5 | f846575cb858444201e6215c460abfe1 |
|
BLAKE2b-256 | a4de4f6b4ca966e3697c1fd1b66f7bfb7b35b1170e43fe55f6927f1ff8f7e9e2 |