Git Product home page Git Product logo

symengine.py's Introduction

SymEngine Python Wrappers

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

Build Status Build status

Installation

Pip

See License section for information about wheels

pip install symengine --user

Conda package manager

conda install python-symengine -c symengine -c conda-forge

optionally, you may choose to install an early developer preview:

conda install python-symengine -c symengine/label/dev -c conda-forge

Build from source

Install prerequisites.

CMake       >= 2.8.12
Python3     >= 3.7
Cython      >= 0.29.24
SymEngine   >= 0.7.0

For SymEngine, only a specific commit/tag (see symengine_version.txt) is supported. Latest git master branch may not work as there may be breaking changes in SymEngine.

Python wrappers can be installed by,

python setup.py install

Additional options to setup.py are

python setup.py install build_ext
    --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
    --inplace                                               # Build the extension in source tree

Standard options to setup.py like --user, --prefix can be used to configure install location. NumPy is used if found by default, if you wish to make your choice of NumPy use explicit: then add e.g. WITH_NUMPY=False to --define.

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.

License

symengine.py is MIT licensed and uses several LGPL, BSD-3 and MIT licensed libraries

Licenses for the dependencies of pip wheels are as follows,

pip wheels on Unix use GMP (LGPL-3.0-or-later), MPFR (LGPL-3.0-or-later), MPC (LGPL-3.0-or-later), LLVM (Apache-2.0), zlib (Zlib) and symengine (MIT AND BSD-3-Clause). pip wheels on Windows use MPIR (LGPL-3.0-or-later) instead of GMP above and pthreads-win32 (LGPL-3.0-or-later) additionally. NumPy (BSD-3-Clause) and SymPy (BSD-3-Clause) are optional dependencies. Sources for these binary dependencies can be found on https://github.com/symengine/symengine-wheels/releases

symengine.py's People

Contributors

isuruf avatar certik avatar bjodah avatar shikharj avatar thilinarmtb avatar rikardn avatar rwst avatar marlin-na avatar mattwala avatar cbehan avatar sumith1896 avatar haozeke avatar sushant-hiray avatar pbrady avatar eendebakpt avatar shivamvats avatar richardotis avatar ichumuh avatar mtreinish avatar alanlh avatar gsam avatar harakas avatar abhinavagarwal07 avatar ayushk7102 avatar erikagnvall avatar jcfr avatar mgorny avatar midnighter avatar npochhi avatar xoviat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.