Skip to content
Prototype package for symbolic manipulation.
Python Shell JavaScript
Branch: master
Clone or download
Latest commit d1b5973 Oct 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks
conda-recipe Fix Matrix Jul 20, 2016
examples
pysym
scripts
.drone.yml Removed Cython version, updated CI scripts Feb 2, 2016
.gitignore
AUTHORS
CHANGES.rst
LICENSE
MANIFEST.in
README.rst
setup.cfg
setup.py

README.rst

pysym

Build status PyPI version Python version License airspeedvelocity coverage

pysym is an experimental Python package for symbolic manipulation with limited scope (as in minimal). It tries to stay compatible with the API of SymPy. It should be viewed as a prototype and not as a "production" package.

The capabilities include:

  • Differentiation
  • (slow) numerical evaluation (including "lambdify" support)

The above capabilities are exactly what is needed by pyodesys and pyneqsys.

Documentation

Autogenerated API documentation is found here: https://pythonhosted.org/pysym (and dev docs are here: http://hera.physchem.kth.se/~pysym/branches/master/html).

Installation

Simplest way to install pysym and its (optional) dependencies is to use pip:

$ pip install --user pysym pytest
$ python -m pytest --pyargs pysym

or the conda package manager:

$ conda install -c bjodah pysym pytest
$ python -m pytest --pyargs pysym

There are no requirements outside the Python standard library.

Source distribution is available here: https://pypi.python.org/pypi/pysym

Example

Differentiation

>>> from pysym import Symbol, tan
>>> x, y = map(Symbol, 'x y'.split())
>>> expr = x*y**2 - 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/~pysym/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/pysym

Author

Björn I. Dahlgren, contact:

  • gmail address: bjodah
You can’t perform that action at this time.