sigmaepsilon.math


Namesigmaepsilon.math JSON
Version 1.2.1 PyPI version JSON
download
home_pagehttps://github.com/sigma-epsilon/sigmaepsilon.math
SummaryA Python Library for Applied Mathematics in Physical Sciences.
upload_time2024-03-20 06:39:04
maintainerBence Balogh
docs_urlNone
authorBence Balogh
requires_python<4.0,>=3.10
licenseMIT
keywords engineering mathematics optimization vector tensor vector algebra tensor algebra symbolic mathematics nonlinear optimization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # **SigmaEpsilon.Math** - A Python Library for Applied Mathematics in Physical Sciences

[![CircleCI](https://dl.circleci.com/status-badge/img/gh/sigma-epsilon/sigmaepsilon.math/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/sigma-epsilon/sigmaepsilon.math/tree/main)
[![Documentation Status](https://readthedocs.org/projects/sigmaepsilonmath/badge/?version=latest)](https://sigmaepsilonmath.readthedocs.io/en/latest/?badge=latest)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI](https://badge.fury.io/py/sigmaepsilon.math.svg)](https://pypi.org/project/sigmaepsilon.math)
[![codecov](https://codecov.io/gh/sigma-epsilon/sigmaepsilon.math/graph/badge.svg?token=GP9FSFQW34)](https://codecov.io/gh/sigma-epsilon/sigmaepsilon.math)
[![Python](https://img.shields.io/badge/python-3.10%E2%80%923.*-blue)](https://www.python.org)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

`SigmaEpsilon.Math` is a Python library that provides tools to formulate and solve problems related to all kinds of scientific disciplines. It is a part of the SigmaEpsilon ecosystem, which is designed mainly to solve problems related to computational solid mechanics, but if something is general enough, it ends up here. A good example is the included vector and tensor algebra modules, or the various optimizers, which are applicable in a much broader context than they were originally designed for.

The most important features:

* Linear Algebra
  * A mechanism that guarantees to maintain the property of objectivity of tensorial quantities.
  * A `ReferenceFrame` class for all kinds of frames, and dedicated `RectangularFrame` and `CartesianFrame` classes as special cases, all NumPy compliant.
  * NumPy compliant classes like `Tensor` and `Vector` to handle various kinds of tensorial quantities efficiently.
  * A `JaggedArray` and a Numba-jittable `csr_matrix` to handle sparse data.

* Operations Research
  * Classes to define and solve linear and nonlinear optimization problems.
    * A `LinearProgrammingProblem` class to define and solve any kind of linear optimization problem.
    * A `BinaryGeneticAlgorithm` class to tackle more complicated optimization problems.

* Graph Theory
  * Algorithms to calculate rooted level structures and pseudo peripheral nodes of a `networkx` graph, which are useful if you want to minimize the bandwidth of sparse symmetrix matrices.

> **Note**
> Be aware, that the library uses JIT-compilation through Numba, and as a result,
> first calls to these functions may take longer, but it pays off big time in the long run.

## **Documentation**

The [documentation](https://sigmaepsilonmath.readthedocs.io/en/latest/) is hosted on ReadTheDocs. You can find examples there.

## **Installation**

sigmaepsilon.math can be installed from PyPI using wither `pip` or `Poetry` on Python >=3.10:

### Install using pip

```console
>>> pip install sigmaepsilon.math
```

or chechkout with the following command using GitHub CLI

```console
gh repo clone sigma-epsilon/sigmaepsilon.math
```

and install from source by typing

```console
>>> pip install .
```

If you want to run the tests, you can install the package along with the necessary optional dependencies like this

```console
>>> pip install ".[test]"
```

If you are a developer and want to install the library in development mode, the suggested way is by using this command:

```console
>>> pip install "-e .[test, dev]"
```

### Install using Poetry

```console
>>> poetry install sigmaepsilon.math
```

If you want to run the tests, you can install the package along with the necessary optional dependencies like this

```console
>>> poetry install sigmaepsilon.math --with test
```

If you are a developer and want to install the library in development mode, the suggested way is by using this command:

```console
>>> poetry install sigmaepsilon.math --with test,dev
```

## Testing and coverage

The following command runs all tests and creates a html report in a folder named `htmlcov` (the settings are governed by the `.coveragerc` file):

```console
python -m pytest --cov-report html --cov-config=.coveragerc --cov sigmaepsilon.math
```

ALternatively, you can use Poetry to test the package:

```console
poetry run pytest --cov-report=html --cov-config=.coveragerc --cov=sigmaepsilon.math
```

## Changes and versioning

See the [changelog](CHANGELOG.md), for the most notable changes between releases.

The project adheres to [semantic versioning](https://semver.org/).

## How to contribute?

Contributions are currently expected in any the following ways:

* finding bugs
  If you run into trouble when using the library and you think it is a bug, feel free to raise an issue.
* feedback
  All kinds of ideas are welcome. For instance if you feel like something is still shady (after reading the user guide), we want to know. Be gentle though, the development of the library is financially not supported yet.
* feature requests
  Tell us what you think is missing (with realistic expectations).
* examples
  If you've done something with the library and you think that it would make for a good example, get in touch with the developers and we will happily inlude it in the documention.
* sharing is caring
  If you like the library, share it with your friends or colleagues so they can like it too.

In all cases, read the [contributing guidelines](CONTRIBUTING.md) before you do anything.

## Acknowledgements

Although `sigmaepsilon.math` heavily builds on `NumPy`, `Scipy`, `Numba` and `Awkward` and it also has functionality related to `networkx` and other third party libraries. Whithout these libraries the concept of writing performant, yet elegant Python code would be much more difficult.

**A lot of the packages mentioned on this document here and the introduction have a citable research paper. If you use them in your work through sigmaepsilon.mesh, take a moment to check out their documentations and cite their papers.**

Also, funding of these libraries is partly based on the size of the community they are able to support. If what you are doing strongly relies on these libraries, don't forget to press the :star: button to show your support.

## **License**

This package is licensed under the [MIT license](LICENSE.txt).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sigma-epsilon/sigmaepsilon.math",
    "name": "sigmaepsilon.math",
    "maintainer": "Bence Balogh",
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": "bencebalogh@sigmaepsilon.com",
    "keywords": "engineering, mathematics, optimization, vector, tensor, vector algebra, tensor algebra, symbolic mathematics, nonlinear optimization",
    "author": "Bence Balogh",
    "author_email": "bencebalogh@sigmaepsilon.com",
    "download_url": "https://files.pythonhosted.org/packages/35/40/e07a2a4b26d5b6e45fe4dcde997ed99edcd117709903fc7daadefd971a7d/sigmaepsilon_math-1.2.1.tar.gz",
    "platform": null,
    "description": "# **SigmaEpsilon.Math** - A Python Library for Applied Mathematics in Physical Sciences\n\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/sigma-epsilon/sigmaepsilon.math/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/sigma-epsilon/sigmaepsilon.math/tree/main)\n[![Documentation Status](https://readthedocs.org/projects/sigmaepsilonmath/badge/?version=latest)](https://sigmaepsilonmath.readthedocs.io/en/latest/?badge=latest)\n[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![PyPI](https://badge.fury.io/py/sigmaepsilon.math.svg)](https://pypi.org/project/sigmaepsilon.math)\n[![codecov](https://codecov.io/gh/sigma-epsilon/sigmaepsilon.math/graph/badge.svg?token=GP9FSFQW34)](https://codecov.io/gh/sigma-epsilon/sigmaepsilon.math)\n[![Python](https://img.shields.io/badge/python-3.10%E2%80%923.*-blue)](https://www.python.org)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n`SigmaEpsilon.Math` is a Python library that provides tools to formulate and solve problems related to all kinds of scientific disciplines. It is a part of the SigmaEpsilon ecosystem, which is designed mainly to solve problems related to computational solid mechanics, but if something is general enough, it ends up here. A good example is the included vector and tensor algebra modules, or the various optimizers, which are applicable in a much broader context than they were originally designed for.\n\nThe most important features:\n\n* Linear Algebra\n  * A mechanism that guarantees to maintain the property of objectivity of tensorial quantities.\n  * A `ReferenceFrame` class for all kinds of frames, and dedicated `RectangularFrame` and `CartesianFrame` classes as special cases, all NumPy compliant.\n  * NumPy compliant classes like `Tensor` and `Vector` to handle various kinds of tensorial quantities efficiently.\n  * A `JaggedArray` and a Numba-jittable `csr_matrix` to handle sparse data.\n\n* Operations Research\n  * Classes to define and solve linear and nonlinear optimization problems.\n    * A `LinearProgrammingProblem` class to define and solve any kind of linear optimization problem.\n    * A `BinaryGeneticAlgorithm` class to tackle more complicated optimization problems.\n\n* Graph Theory\n  * Algorithms to calculate rooted level structures and pseudo peripheral nodes of a `networkx` graph, which are useful if you want to minimize the bandwidth of sparse symmetrix matrices.\n\n> **Note**\n> Be aware, that the library uses JIT-compilation through Numba, and as a result,\n> first calls to these functions may take longer, but it pays off big time in the long run.\n\n## **Documentation**\n\nThe [documentation](https://sigmaepsilonmath.readthedocs.io/en/latest/) is hosted on ReadTheDocs. You can find examples there.\n\n## **Installation**\n\nsigmaepsilon.math can be installed from PyPI using wither `pip` or `Poetry` on Python >=3.10:\n\n### Install using pip\n\n```console\n>>> pip install sigmaepsilon.math\n```\n\nor chechkout with the following command using GitHub CLI\n\n```console\ngh repo clone sigma-epsilon/sigmaepsilon.math\n```\n\nand install from source by typing\n\n```console\n>>> pip install .\n```\n\nIf you want to run the tests, you can install the package along with the necessary optional dependencies like this\n\n```console\n>>> pip install \".[test]\"\n```\n\nIf you are a developer and want to install the library in development mode, the suggested way is by using this command:\n\n```console\n>>> pip install \"-e .[test, dev]\"\n```\n\n### Install using Poetry\n\n```console\n>>> poetry install sigmaepsilon.math\n```\n\nIf you want to run the tests, you can install the package along with the necessary optional dependencies like this\n\n```console\n>>> poetry install sigmaepsilon.math --with test\n```\n\nIf you are a developer and want to install the library in development mode, the suggested way is by using this command:\n\n```console\n>>> poetry install sigmaepsilon.math --with test,dev\n```\n\n## Testing and coverage\n\nThe following command runs all tests and creates a html report in a folder named `htmlcov` (the settings are governed by the `.coveragerc` file):\n\n```console\npython -m pytest --cov-report html --cov-config=.coveragerc --cov sigmaepsilon.math\n```\n\nALternatively, you can use Poetry to test the package:\n\n```console\npoetry run pytest --cov-report=html --cov-config=.coveragerc --cov=sigmaepsilon.math\n```\n\n## Changes and versioning\n\nSee the [changelog](CHANGELOG.md), for the most notable changes between releases.\n\nThe project adheres to [semantic versioning](https://semver.org/).\n\n## How to contribute?\n\nContributions are currently expected in any the following ways:\n\n* finding bugs\n  If you run into trouble when using the library and you think it is a bug, feel free to raise an issue.\n* feedback\n  All kinds of ideas are welcome. For instance if you feel like something is still shady (after reading the user guide), we want to know. Be gentle though, the development of the library is financially not supported yet.\n* feature requests\n  Tell us what you think is missing (with realistic expectations).\n* examples\n  If you've done something with the library and you think that it would make for a good example, get in touch with the developers and we will happily inlude it in the documention.\n* sharing is caring\n  If you like the library, share it with your friends or colleagues so they can like it too.\n\nIn all cases, read the [contributing guidelines](CONTRIBUTING.md) before you do anything.\n\n## Acknowledgements\n\nAlthough `sigmaepsilon.math` heavily builds on `NumPy`, `Scipy`, `Numba` and `Awkward` and it also has functionality related to `networkx` and other third party libraries. Whithout these libraries the concept of writing performant, yet elegant Python code would be much more difficult.\n\n**A lot of the packages mentioned on this document here and the introduction have a citable research paper. If you use them in your work through sigmaepsilon.mesh, take a moment to check out their documentations and cite their papers.**\n\nAlso, funding of these libraries is partly based on the size of the community they are able to support. If what you are doing strongly relies on these libraries, don't forget to press the :star: button to show your support.\n\n## **License**\n\nThis package is licensed under the [MIT license](LICENSE.txt).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python Library for Applied Mathematics in Physical Sciences.",
    "version": "1.2.1",
    "project_urls": {
        "Documentation": "https://sigmaepsilonmath.readthedocs.io/en/latest/?badge=latest",
        "Homepage": "https://github.com/sigma-epsilon/sigmaepsilon.math",
        "Repository": "https://github.com/sigma-epsilon/sigmaepsilon.math"
    },
    "split_keywords": [
        "engineering",
        " mathematics",
        " optimization",
        " vector",
        " tensor",
        " vector algebra",
        " tensor algebra",
        " symbolic mathematics",
        " nonlinear optimization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7534e4be526b3a5db1e7f98a42b3802116c15d3790038830fe848f30355f30e",
                "md5": "6c5162d2439c69240450b37055e58226",
                "sha256": "d4f061209ad39ab85ef56a465491b5db803ce4f7674606cdc02c475aacf4cfb9"
            },
            "downloads": -1,
            "filename": "sigmaepsilon_math-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6c5162d2439c69240450b37055e58226",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 102048,
            "upload_time": "2024-03-20T06:39:02",
            "upload_time_iso_8601": "2024-03-20T06:39:02.212010Z",
            "url": "https://files.pythonhosted.org/packages/f7/53/4e4be526b3a5db1e7f98a42b3802116c15d3790038830fe848f30355f30e/sigmaepsilon_math-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3540e07a2a4b26d5b6e45fe4dcde997ed99edcd117709903fc7daadefd971a7d",
                "md5": "d636209032fefeb0e8dcc2a7cb65d4d5",
                "sha256": "3c1f0c326aa451d2d3f0ff9d2cd7ffc6be3a0bbf9f05a938aa1eb102c5bea3ba"
            },
            "downloads": -1,
            "filename": "sigmaepsilon_math-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d636209032fefeb0e8dcc2a7cb65d4d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 82635,
            "upload_time": "2024-03-20T06:39:04",
            "upload_time_iso_8601": "2024-03-20T06:39:04.199107Z",
            "url": "https://files.pythonhosted.org/packages/35/40/e07a2a4b26d5b6e45fe4dcde997ed99edcd117709903fc7daadefd971a7d/sigmaepsilon_math-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-20 06:39:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sigma-epsilon",
    "github_project": "sigmaepsilon.math",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "circle": true,
    "requirements": [],
    "lcname": "sigmaepsilon.math"
}
        
Elapsed time: 0.21439s