micromatrix


Namemicromatrix JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryA lightweight Python module which adds a generalized matrix class, supporting many matrix operations with no external dependencies
upload_time2023-09-10 08:02:23
maintainer
docs_urlNone
authorh-janes
requires_python>=3.10,<4.0
licenseMIT
keywords python3 math matrix
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MicroMatrix
**This is an old unfinished project which I plan to work on soon.**

MicroMatrix is a lightweight Python module which adds a generalized `Matrix` class, supporting many matrix operations with no external dependencies.

**MicroMatrix Supports:**
* Matrices of any size
* Complex Numbers
* Addition & Subtraction
* Multiplication & Division
* Integer Exponentiation
* Transposition
* Inverse & Determinant
* Assignment Operators
* And more!

## Usage
### Installation
Flask Sitemapper requires Python 3.10 or newer. The latest version can be installed from PyPi with pip as shown below.
```terminal
pip install micromatrix
```

Now you can import the `Matrix` class to use in your code.
```python
from micromatrix import Matrix

# Creating a 3x2 matrix
my_matrix = Matrix([1, 2, 3], [4, 5, 6])
```

### Supported Operations
MicroMatrix supports many operations, including the standard Python mathematical operators and common matrix operations. These operations can be combined and used for complex calculations.

Keep in mind that some operations may not be possible depending on the dimension and elements of your matrices. In that case, you will see a `ValueError` with a description such as:
```terminal
ValueError: Operation requires a square matrix
```

#### Reversible Operations
* `Matrix + int | float | complex | Matrix -> Matrix`
* `Matrix - int | float | complex | Matrix -> Matrix`
* `Matrix * int | float | complex | Matrix -> Matrix`
* `Matrix / int | float | complex | Matrix -> Matrix`
* `Matrix == Any -> bool`
#### Non-Reversible Operations
* `Matrix ** int -> Matrix`
* `+ Matrix -> Matrix`
* `- Matrix -> Matrix`
* `~ Matrix -> Matrix`
* `abs(Matrix) -> Matrix`
* `len(Matrix) -> int`
* `str(Matrix) -> str`

#### Properties
* `Matrix.identity -> Matrix`
* `Matrix.transpose -> Matrix`
* `Matrix.determinant -> int | float | complex`
* `Matrix.invert -> Matrix`

#### Methods
* `Matrix.administer(func) -> Matrix` applies func to each value in Matrix

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "micromatrix",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "python3,math,matrix",
    "author": "h-janes",
    "author_email": "dev@hjanes.com",
    "download_url": "https://files.pythonhosted.org/packages/77/86/fe46c4d8c9e84c5418623461c129980f2f6af60b5f542e8a4740e74ecc1f/micromatrix-1.0.0.tar.gz",
    "platform": null,
    "description": "# MicroMatrix\n**This is an old unfinished project which I plan to work on soon.**\n\nMicroMatrix is a lightweight Python module which adds a generalized `Matrix` class, supporting many matrix operations with no external dependencies.\n\n**MicroMatrix Supports:**\n* Matrices of any size\n* Complex Numbers\n* Addition & Subtraction\n* Multiplication & Division\n* Integer Exponentiation\n* Transposition\n* Inverse & Determinant\n* Assignment Operators\n* And more!\n\n## Usage\n### Installation\nFlask Sitemapper requires Python 3.10 or newer. The latest version can be installed from PyPi with pip as shown below.\n```terminal\npip install micromatrix\n```\n\nNow you can import the `Matrix` class to use in your code.\n```python\nfrom micromatrix import Matrix\n\n# Creating a 3x2 matrix\nmy_matrix = Matrix([1, 2, 3], [4, 5, 6])\n```\n\n### Supported Operations\nMicroMatrix supports many operations, including the standard Python mathematical operators and common matrix operations. These operations can be combined and used for complex calculations.\n\nKeep in mind that some operations may not be possible depending on the dimension and elements of your matrices. In that case, you will see a `ValueError` with a description such as:\n```terminal\nValueError: Operation requires a square matrix\n```\n\n#### Reversible Operations\n* `Matrix + int | float | complex | Matrix -> Matrix`\n* `Matrix - int | float | complex | Matrix -> Matrix`\n* `Matrix * int | float | complex | Matrix -> Matrix`\n* `Matrix / int | float | complex | Matrix -> Matrix`\n* `Matrix == Any -> bool`\n#### Non-Reversible Operations\n* `Matrix ** int -> Matrix`\n* `+ Matrix -> Matrix`\n* `- Matrix -> Matrix`\n* `~ Matrix -> Matrix`\n* `abs(Matrix) -> Matrix`\n* `len(Matrix) -> int`\n* `str(Matrix) -> str`\n\n#### Properties\n* `Matrix.identity -> Matrix`\n* `Matrix.transpose -> Matrix`\n* `Matrix.determinant -> int | float | complex`\n* `Matrix.invert -> Matrix`\n\n#### Methods\n* `Matrix.administer(func) -> Matrix` applies func to each value in Matrix\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A lightweight Python module which adds a generalized matrix class, supporting many matrix operations with no external dependencies",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [
        "python3",
        "math",
        "matrix"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7e2b288cbfe9b352f5c23d582e650b4ae2af2086a628863c2f4ed91e2fd56b5",
                "md5": "48a9a19ab5609033818cdf29a683c1c9",
                "sha256": "7e2b9a44cac077e16df994f697f17a9ca32b41fb34eae952ffb707a60eb7b5ce"
            },
            "downloads": -1,
            "filename": "micromatrix-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48a9a19ab5609033818cdf29a683c1c9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 4675,
            "upload_time": "2023-09-10T08:02:21",
            "upload_time_iso_8601": "2023-09-10T08:02:21.975669Z",
            "url": "https://files.pythonhosted.org/packages/c7/e2/b288cbfe9b352f5c23d582e650b4ae2af2086a628863c2f4ed91e2fd56b5/micromatrix-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7786fe46c4d8c9e84c5418623461c129980f2f6af60b5f542e8a4740e74ecc1f",
                "md5": "33eb35168f745c954d7ec536e56f7d19",
                "sha256": "2316f8530be314aa8fb496ced5cee0a1a7a3c90b6bde8a5c454a92a47ebf9700"
            },
            "downloads": -1,
            "filename": "micromatrix-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "33eb35168f745c954d7ec536e56f7d19",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 4070,
            "upload_time": "2023-09-10T08:02:23",
            "upload_time_iso_8601": "2023-09-10T08:02:23.481688Z",
            "url": "https://files.pythonhosted.org/packages/77/86/fe46c4d8c9e84c5418623461c129980f2f6af60b5f542e8a4740e74ecc1f/micromatrix-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-10 08:02:23",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "micromatrix"
}
        
Elapsed time: 0.27721s