{"id":50967773,"url":"https://github.com/faresbakhit/matrix-py","last_synced_at":"2026-06-18T22:30:34.386Z","repository":{"id":362235877,"uuid":"354957367","full_name":"faresbakhit/matrix-py","owner":"faresbakhit","description":"Hackable Matrix module written in pure Python + CLI","archived":false,"fork":false,"pushed_at":"2021-08-12T08:02:58.000Z","size":300,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-03T09:22:05.495Z","etag":null,"topics":["matrix","matrix-library","pypi","python","python-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/faresbakhit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-04-05T20:02:10.000Z","updated_at":"2026-03-31T19:47:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/faresbakhit/matrix-py","commit_stats":null,"previous_names":["faresahmedb/matrix-py"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/faresbakhit/matrix-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faresbakhit%2Fmatrix-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faresbakhit%2Fmatrix-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faresbakhit%2Fmatrix-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faresbakhit%2Fmatrix-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faresbakhit","download_url":"https://codeload.github.com/faresbakhit/matrix-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faresbakhit%2Fmatrix-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34510281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["matrix","matrix-library","pypi","python","python-library"],"created_at":"2026-06-18T22:30:33.598Z","updated_at":"2026-06-18T22:30:34.378Z","avatar_url":"https://github.com/faresbakhit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003eHackable Matrix module written in pure Python + CLI\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://pypi.python.org/pypi/matrix-py/\"\u003e\u003cimg alt=\"PyPI version shields.io\" src=\"https://img.shields.io/pypi/v/matrix-py.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.python.org/pypi/matrix-py/\"\u003e\u003cimg alt=\"PyPI license\" src=\"https://img.shields.io/pypi/l/matrix-py.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.codacy.com/gh/FaresAhmedb/matrix-py/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=FaresAhmedb/matrix-py\u0026amp;utm_campaign=Badge_Grade\"\u003e\u003cimg alt=\"Codacy Badge\" src=\"https://app.codacy.com/project/badge/Grade/480bf6060f5a49938991f62a368f8859\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nmatrix-py Module is a python module to:\n\n  - Add Matrices :heavy_check_mark:\n\n  - Substract Matrices :heavy_check_mark:\n\n  - Multiply Matrices :heavy_check_mark:\n\n  - Transpose Matrices :heavy_check_mark:\n\nand many other things will come on 1.0 (if the project is still live)\n\nWorks with Python3+ \n\n---\n\n# Installation\nAs far as I'm concerned it should work on any python3 version but it's always good to have the latest version since it will be the one I am sure it works on\n\n## Using PyPI\n```console\n$ pip install matrix-py\n```\n\n## Manule Installation\n```console\n$ git clone https://github.com/FaresAhmedb/matrix-py.git\n$ cd matrix-py \u0026\u0026 python setup.py install --user\n```\n\nNow Try it! \n```console\n$ matrixpy -h\n```\nOn Windows\n```console\n\u003e python -m matrixpy -h\n```\n\nThe ouput should be something like this:\n```console\nusage: __main__.py [-h] [-v] [-s] [-t] [-ma] [-op] [-mb] [-i]\n\nMatrix Minuplation module to add, substract, multiply matrices.\n\noptional arguments:\n  -h, --help         show this help message and exit\n  -v, --version      show program's version number and exit\n  -s , --size        Size of A Matrix\n  -t , --transpose   Transpose of A Matrix (-t \"[[1, 2, 3], [4, 5, 6]]\")\n  -ma , --matrixa    Matrix A (.. -ma \"[[1, 2, 3], [4, 5, 6]]\")\n  -op , --operator   Operator (.. -op \"+\", \"-\", \"*\")\n  -mb , --matrixb    Matrix B (.. -mb \"[[1, 2, 3], [4, 5, 6]]\")\n  -i , --int         Integer (.. -i 69)\n\nUsage: .. -ma \"[[1, 2, 3], [4, 5, 6]]\" -op \"+\" -mb \"[[7, 8, 9], [10, 11, 12]]\"\n```\n\n# Usage\nMost of what is written here is: old, changed or old, removed or better methods were made\nI am planning on writing a REAL documntation but in the mean time if you want to use the module\nall the docstring are well written and will tell you about everything.\nAvillable on github pages: https://faresahmedb.github.io/matrix-py/reference/\nor in python:\n```python\n\u003e\u003e\u003e import matrixpy\n\u003e\u003e\u003e help(matrixpy)\n```\n\n## - The Module\nSample code:\n```python\n\n\nfrom matrixpy import Matrix\n\nA = Matrix(\"1 2 3; 4 5 6\")   # String -\u003e Matrix Object\nB = Matrix([[1, 4],\n            [2, 5],\n            [3, 6]]) # List -\u003e Matrix Object\n\n# Print the multiply of Matrix A * Matrix B\nprint(A * B)\n# Ouput:\n# 14 32\n# 32 77\n# (2x2)\n\n# Print the addition of the negative Matrix A + Matrix B transposed\nprint(-A + B.transpose()) \n# Ouput:\n# 0 0 0\n# 0 0 0\n# (2x3)\n\n# 0.1% solved this\nC = (+A.transpose() - -B) - (B * 3) + (A.transpose() * 5)\nprint(C)\n# Output:\n# 4 16\n# 8 20\n# 12 24\n# (3x2)\n\n# Convert the Matrix to a list if you want to manipulate the matrices yourself\nC = C.tolist()\nprint(type(C))\n# Output:\n# \u003cclass 'list'\u003e\n```\n\n## - The Command Line Interface (CLI)\n\nThe CLI is limited at the moment by one  operation at a time (eg. You can't add 3 matrices) duo to the limitations of argparse \n\nTo get the size of a matrix\n```console\n$ matrixpy -s '[[1, 2, 3], [4, 5, 6]]'\n1 2 3\n4 5 6\n(2x3)\n```\nYour matrix is [[1, 2, 3], [4, 5, 6]] \\\nTo get the transpose of a matrix\n```console\n$ matrixpy -t '[[1, 2, 3], [4, 5, 6]]'\n1 4\n2 5\n3 6\n(3x2)\n```\nTo add 2 matrices to each other or add a matrix to an integer:\n```console\n$ matrixpy -ma '[[1, 2, 3], [4, 5, 6]]' -op '+' -mb '[[1, 2, 3], [4, 5, 6]]'\n2 4 6\n8 10 12\n(2x3)\n\n$ matrixpy -ma '[[1, 2, 3], [4, 5, 6]]' -op '+' -i 2\n3 4 5\n6 7 8\n(2x3)\n```\nto substract or multiply matrices just change the '+' to '-' or '*' \\\nand for a list of the all avillable options\n```\n$ matrixpy --help\n```\n---\n\n## Alpha Noitce\nThe Module is right now in Alpha so there's a big chance there's\nsome bugs so please consider reporting them.\n\nAll Contributions are welcomed so consider looking at the source\ncode on src/matrixpy\n\n## License \u0026copy;\nmatrix-py module to add, substract, multiply matrices.\nCopyright (C) 2021 Fares Ahmed\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaresbakhit%2Fmatrix-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaresbakhit%2Fmatrix-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaresbakhit%2Fmatrix-py/lists"}