Skip to content

harakas/symengine.py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SymEngine Python Wrappers

Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library.

Build Status Build status

Installation

Install prerequisites.

CMake       >= 2.8.7
Python2     >= 2.6      or Python3 >= 3.3
Cython      >= 0.19.1
SymEngine   >= 0.1.0

Python wrappers can be installed by,

python setup.py install

Additional options to setup.py are

python setup.py install build
    --symengine-dir=/path/to/symengine/install/dir          # Path to SymEngine install directory or build directory
    --compiler=mingw32|msvc|cygwin                          # Select the compiler for Windows
    --generator=cmake-generator                             # CMake Generator
    --build-type=Release|Debug                              # Set build-type for multi-configuration generators like MSVC
    --define="var1=value1;var2=value2"                      # Give options to CMake

Standard options to setup.py like --user, --prefix can be used to configure install location

Use SymEngine from Python as follows:

>>> from symengine import var
>>> var("x y z")
(x, y, z)
>>> e = (x+y+z)**2
>>> e.expand()
2*x*y + 2*x*z + 2*y*z + x**2 + y**2 + z**2

You can read Python tests in symengine/tests to see what features are implemented.

About

Python wrappers for SymEngine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 51.1%
  • Cython 44.2%
  • CMake 3.9%
  • Other 0.8%