saltype


Namesaltype JSON
Version 1.4 PyPI version JSON
download
home_pagehttps://github.com/VolkerSiep/saltype
SummarySymbolic algebra light type
upload_time2024-03-13 07:21:16
maintainer
docs_urlNone
authorVolker Siepmann
requires_python>=3.9
license
keywords symbolic algebra
VCS
bugtrack_url
requirements alabaster Babel certifi charset-normalizer docutils idna imagesize Jinja2 MarkupSafe numpy packaging Pygments pytz requests scipy snowballstemmer Sphinx sphinxcontrib-applehelp sphinxcontrib-devhelp sphinxcontrib-htmlhelp sphinxcontrib-jsmath sphinxcontrib-qthelp sphinxcontrib-serializinghtml urllib3 saltype
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # README #

**Saltype** stands for **S**ymbolic **A**lgebra **L**ight **Type**, and is also
a common additive in food preparation, which makes the name fit in the palette
of software developed by me. Salt (as NaCl) is also a substance that can be
found in high quantities in nature. This can be seen in parallel to *saltype*
being developed to obtain derivatives of large scale systems, well at least a
couple of thousand variables.

For the detailed documentation, see here:
https://saltype.readthedocs.io/en/latest/index.html

### How do I get set up? ###

``pip install saltype``


There are no dependencies outside the standard python library to use *saltype*.

BTW: I first called this `salt`, then `salty`, and each time somebody else created another package on
pypi with the same name. Now I'll try to upload this before it happens again.

### Teaser
The core functionality is demonstrated by this very simple example:

    from saltype import Leaf
    from saltype.tools import Derivative
    
    x = Leaf(3.0)
    y = 3 * x**2 + 2*x + 1
    
    dy_dx = Derivative([y], [x])[0, 0]
    print(dy_dx.value)  # = 6 * x + 2 = 20

In applications, we use this package to generate and evaluate Jacobian matrices of O(10000). Then it takes typically O(10) seconds to generate the Jacobian and O(1) second to evaluate it in each iteration. Of course, our Jacobians are also sparse, with less than 50 non-zero elements per row.

### For developing ...

`sphinx` is required to build the documentation, and `pytest` is handy to run the tests, though
they also run on the stdlib `unittest` module.

To build the documentation from the repo, enter the gendoc directory and run

`make html`

As being generic functionality of `sphinx`, this should work on Linux, Wintendo and Mac.

There are a number of unit tests in the `unittest` directory. Run 

### Contribution guidelines ###

Well, let's first get a star on github, before we talk about somebody else being
interested in taking this further. Honestly, for many purposes, `casadi` is a better
choice here, but if you just need something lightweight, maybe on embedded systems,
then this might actually be the niece for `salttype`.

Contributions in the shape of coding and suggestions are welcome.
The issue tracker is open for that.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/VolkerSiep/saltype",
    "name": "saltype",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "symbolic algebra",
    "author": "Volker Siepmann",
    "author_email": "volker.siepmann@gmail.com,",
    "download_url": "https://files.pythonhosted.org/packages/e9/3e/d436073fde8fafaa165573c27bc64310162f749305363f34165a5df8eb0d/saltype-1.4.tar.gz",
    "platform": null,
    "description": "# README #\r\n\r\n**Saltype** stands for **S**ymbolic **A**lgebra **L**ight **Type**, and is also\r\na common additive in food preparation, which makes the name fit in the palette\r\nof software developed by me. Salt (as NaCl) is also a substance that can be\r\nfound in high quantities in nature. This can be seen in parallel to *saltype*\r\nbeing developed to obtain derivatives of large scale systems, well at least a\r\ncouple of thousand variables.\r\n\r\nFor the detailed documentation, see here:\r\nhttps://saltype.readthedocs.io/en/latest/index.html\r\n\r\n### How do I get set up? ###\r\n\r\n``pip install saltype``\r\n\r\n\r\nThere are no dependencies outside the standard python library to use *saltype*.\r\n\r\nBTW: I first called this `salt`, then `salty`, and each time somebody else created another package on\r\npypi with the same name. Now I'll try to upload this before it happens again.\r\n\r\n### Teaser\r\nThe core functionality is demonstrated by this very simple example:\r\n\r\n    from saltype import Leaf\r\n    from saltype.tools import Derivative\r\n    \r\n    x = Leaf(3.0)\r\n    y = 3 * x**2 + 2*x + 1\r\n    \r\n    dy_dx = Derivative([y], [x])[0, 0]\r\n    print(dy_dx.value)  # = 6 * x + 2 = 20\r\n\r\nIn applications, we use this package to generate and evaluate Jacobian matrices of O(10000). Then it takes typically O(10) seconds to generate the Jacobian and O(1) second to evaluate it in each iteration. Of course, our Jacobians are also sparse, with less than 50 non-zero elements per row.\r\n\r\n### For developing ...\r\n\r\n`sphinx` is required to build the documentation, and `pytest` is handy to run the tests, though\r\nthey also run on the stdlib `unittest` module.\r\n\r\nTo build the documentation from the repo, enter the gendoc directory and run\r\n\r\n`make html`\r\n\r\nAs being generic functionality of `sphinx`, this should work on Linux, Wintendo and Mac.\r\n\r\nThere are a number of unit tests in the `unittest` directory. Run \r\n\r\n### Contribution guidelines ###\r\n\r\nWell, let's first get a star on github, before we talk about somebody else being\r\ninterested in taking this further. Honestly, for many purposes, `casadi` is a better\r\nchoice here, but if you just need something lightweight, maybe on embedded systems,\r\nthen this might actually be the niece for `salttype`.\r\n\r\nContributions in the shape of coding and suggestions are welcome.\r\nThe issue tracker is open for that.\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Symbolic algebra light type",
    "version": "1.4",
    "project_urls": {
        "Homepage": "https://github.com/VolkerSiep/saltype"
    },
    "split_keywords": [
        "symbolic",
        "algebra"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1d5e0efb21aad7c9dc516b347eb884751bcc5c9862a5ab9d01ad9c4b9686d76f",
                "md5": "3230396885aa53c5c93bdbfc550c1a52",
                "sha256": "d13b3f1d064674b273f430a2cfbad0c4b51cfe5b9aa63bef44df6b48352b68bb"
            },
            "downloads": -1,
            "filename": "saltype-1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3230396885aa53c5c93bdbfc550c1a52",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 36384,
            "upload_time": "2024-03-13T07:21:12",
            "upload_time_iso_8601": "2024-03-13T07:21:12.702181Z",
            "url": "https://files.pythonhosted.org/packages/1d/5e/0efb21aad7c9dc516b347eb884751bcc5c9862a5ab9d01ad9c4b9686d76f/saltype-1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e93ed436073fde8fafaa165573c27bc64310162f749305363f34165a5df8eb0d",
                "md5": "4fb4026d3be3ac95e6796ff43dbffecf",
                "sha256": "f587cfc7f92a95e249cffa92972898d47d62c40b18e17bf4cee4f5492724252c"
            },
            "downloads": -1,
            "filename": "saltype-1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "4fb4026d3be3ac95e6796ff43dbffecf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 21361,
            "upload_time": "2024-03-13T07:21:16",
            "upload_time_iso_8601": "2024-03-13T07:21:16.354751Z",
            "url": "https://files.pythonhosted.org/packages/e9/3e/d436073fde8fafaa165573c27bc64310162f749305363f34165a5df8eb0d/saltype-1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-13 07:21:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "VolkerSiep",
    "github_project": "saltype",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "alabaster",
            "specs": [
                [
                    "==",
                    "0.7.13"
                ]
            ]
        },
        {
            "name": "Babel",
            "specs": [
                [
                    "==",
                    "2.11.0"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2023.7.22"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.0.1"
                ]
            ]
        },
        {
            "name": "docutils",
            "specs": [
                [
                    "==",
                    "0.19"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.4"
                ]
            ]
        },
        {
            "name": "imagesize",
            "specs": [
                [
                    "==",
                    "1.4.1"
                ]
            ]
        },
        {
            "name": "Jinja2",
            "specs": [
                [
                    "==",
                    "3.1.3"
                ]
            ]
        },
        {
            "name": "MarkupSafe",
            "specs": [
                [
                    "==",
                    "2.1.2"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.24.2"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "23.0"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.15.0"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2022.7.1"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    "==",
                    "1.10.0"
                ]
            ]
        },
        {
            "name": "snowballstemmer",
            "specs": [
                [
                    "==",
                    "2.2.0"
                ]
            ]
        },
        {
            "name": "Sphinx",
            "specs": [
                [
                    "==",
                    "6.1.3"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-applehelp",
            "specs": [
                [
                    "==",
                    "1.0.4"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-devhelp",
            "specs": [
                [
                    "==",
                    "1.0.2"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-htmlhelp",
            "specs": [
                [
                    "==",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-jsmath",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-qthelp",
            "specs": [
                [
                    "==",
                    "1.0.3"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-serializinghtml",
            "specs": [
                [
                    "==",
                    "1.1.5"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "1.26.18"
                ]
            ]
        },
        {
            "name": "saltype",
            "specs": []
        }
    ],
    "lcname": "saltype"
}
        
Elapsed time: 0.25816s