README
Saltype stands for Symbolic Algebra Light 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.
Metadata
Release files for saltype 1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| saltype-1.4.tar.gz | 21.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| saltype-1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.7 kB
Release files / saltype-1.4.tar.gz
| Download URL | saltype-1.4.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f587cfc7f92a95e249cffa92972898d47d62c40b18e17bf4cee4f5492724252c
|
|
BLAKE2b-256 checksum How to use checksums |
e93ed436073fde8fafaa165573c27bc64310162f749305363f34165a5df8eb0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.3
|
Release files / saltype-1.4-py3-none-any.whl
| Download URL | saltype-1.4-py3-none-any.whl |
|---|---|
| Size | 36.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d13b3f1d064674b273f430a2cfbad0c4b51cfe5b9aa63bef44df6b48352b68bb
|
|
BLAKE2b-256 checksum How to use checksums |
1d5e0efb21aad7c9dc516b347eb884751bcc5c9862a5ab9d01ad9c4b9686d76f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.3
|