from matrix import Matrix
from matrix import extra
x = Matrix([[1,2,3],[4,5,6]], dtype=int) # default symbol = None
y = Matrix([[2,3,4],[5,6,7]], symbol="A") # default dtype = float
print(x()) # <'Matrix' object at 0x7fdfc2d87fa0 dtype=int size=6 shape=(2, 3) symbol=None>
print(y()) # <'Matrix' object at 0x7fb588637f10 dtype=float size=6 shape=(2, 3) symbol=A>
print(x.numpy()) # array([[1, 2, 3], [4, 5, 6]])
print((x + y)()) # <'Matrix' object at 0x7fb544042140 dtype=float size=6 shape=(2, 3) symbol=None>
print(x + y)
"""
Matrix([
[ 3.00000, 5.00000, 7.00000],
[ 9.00000, 11.00000, 13.00000]
], dtype=float, symbol=None, shape=(2, 3))
"""
print(extra.entr(x.astype(float)))
"""
Matrix([
[ -0.00000, -1.38629, -3.29584],
[ -5.54518, -8.04719, -10.75056]
], dtype=float, symbol=None, shape=(2, 3))
"""
print(extra.exp2(y.astype(float)))
"""
Matrix([
[ 4.00000, 8.00000, 16.00000],
[ 32.00000, 64.00000, 128.00000]
], dtype=float, symbol=None, shape=(2, 3))
"""
- clone this repo
git clone "https://github.com/Sahil-Rajwar-2004/matrix.py.git"
-
navigate to matrix directory that you just downloaded/cloned
-
see below instruction for different OS
- If you are on Window OS then run the
install.ps1
script
pwsh install.ps1
- If you are on Linux / MacOS then run the
install.sh
script
bash install.sh
I am currently the sole developer and maintainer of this project. While contributions are welcome, please reach out before starting any major work to ensure that your ideas align with the project's goals. You can open a discussion or contact me directly through the repository.
If you encounter any issues or bugs while using the library, please report them by opening an issue on the GitHub repository. Include a detailed description of the problem, steps to reproduce it, and any relevant error messages or screenshots.
This project is licensed under the MIT License. See the LICENSE file for more information.