Unified wrapper for symbolic manipulation libraries in Python.
Project description
sym provides a unified wrapper to some symbolic manipulation libraries in Python. It makes it easy for library authors to test their packages against several symbolic manipulation libraries.
Currently the following Python pacakges are available as “backends”:
The capabilities exposed here are those needed by
and include:
Differentiation
Numerical evaluation (including “lambdify” support)
see tests for examples. Note that pyodesys and pyneqsys also act as test suits for this package.
Documentation
Auto-generated API documentation for the latest stable release is found here: https://bjodah.github.io/sym/latest (and the development version for the current master branch is found here: http://hera.physchem.kth.se/~sym/branches/master/html).
Installation
Simplest way to install sym and its (optional) dependencies is to use pip:
$ pip install --user sym pytest $ python -m pytest --pyargs sym
or the conda package manager:
$ conda install -c bjodah sym pytest $ python -m pytest --pyargs sym
Source distribution is available here: https://pypi.python.org/pypi/sym
Example
Differentiation
>>> from sym import Backend
>>> be = Backend('pysym') # just an example, use SymPy rather than pysym
>>> x, y = map(be.Symbol, 'x y'.split())
>>> expr = x*y**2 - be.tan(2*x)
>>> print(expr.diff(x))
((y**2) - ((1 + (tan((2*x))**2))*2))
for more examples, see examples/, and rendered jupyter notebooks here: http://hera.physchem.kth.se/~sym/master/examples
License
The source code is Open Source and is released under the simplified 2-clause BSD license. See LICENSE for further details. Contributors are welcome to suggest improvements at https://github.com/bjodah/sym
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file sym-0.3.5.tar.gz
.
File metadata
- Download URL: sym-0.3.5.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 854ddd18f0a1f94c9590012e50a139b499b407c90e9ebd407c40285627784ab8 |
|
MD5 | 84f3c76eacbb7e82f3d44cea83fd5ac0 |
|
BLAKE2b-256 | d2edc06685333acaa3ea4ef301daae784ecc5f60c6ccd288cb84e03e1244acc2 |