GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - symengine/symengine.py: Python wrappers for SymEngine

BranchesTags
Open more actions menu

Latest commit

 

History

1,460 Commits
1,460 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
benchmarks
benchmarks
 
 
bin
bin
 
 
cmake
cmake
 
 
docs
docs
 
 
symengine
symengine
 
 
.gitignore
.gitignore
 
 
.mailmap
.mailmap
 
 
AUTHORS
AUTHORS
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.md
README.md
 
 
appveyor.yml
appveyor.yml
 
 
pyproject.toml
pyproject.toml
 
 
symengine_version.txt
symengine_version.txt
 
 

Repository files navigation

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 conda-forge

Build from source

Install prerequisites.

CMake       >= 3.21
Python3     >= 3.11
SymEngine   >= 0.15.0
pip
setuptools_scm           # will be automatically downloaded by pip
scikit-build-core        # will be automatically downloaded by pip
cython      >= 0.29.24   # will be automatically downloaded by pip
cython-cmake             # will be automatically downloaded by pip

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

Python wrappers can be installed by,

pip install . -vv

If you are building SymEngine for development, you should implement the dependencies automatically installed by pip and do,

pip install -e . -vv --no-build-isolation

A few additional options to scikit-build-core are mentioned here:

pip install -e . -vv --no-build-isolation
    -Ccmake.build-type=Release|Debug                                # Set build-type for multi-configuration generators like MSVC
    -Ccmake.define.SymEngine_DIR=/path/to/symengine/install/dir     # Path to SymEngine install directory or build directory

Notes on Dependencies

If you intend to evaluate floating-point expressions (using lambdify), you should consider linking against LLVM. Many users might also benefit from linking against FLINT, as it is now LGPL-licensed.

In general, sudo is only required if you are installing to the default prefix (/usr/local). We recommend specifying a custom prefix (--prefix=$HOME/.local) to avoid requiring administrative privileges, which most users can do without using sudo.

If you're uncomfortable specifying the prefix manually, we suggest using Conda or installing the pre-built wheels via pip instead of building from source.

Verification

You can verify the installation of SymEngine by using the provided code snippet in this README. This snippet ensures that the installation works as expected and that basic functionality is available.

from symengine import var
x, y, z = var('x y z')
e = (x + y + z)**2
expanded_e = e.expand()
print(expanded_e)

This will output:

x**2 + y**2 + z**2 + 2*x*y + 2*x*z + 2*y*z

Note: The verification code provided above checks the functionality of SymEngine. For additional verification specific to SymEngine, please refer to the official SymEngine Python bindings repository for further tests and examples.

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), libxml2 (MIT), zstd (BSD-3-Clause), 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 symengine-wheels.

About

Python wrappers for SymEngine

Topics

computer-algebramathpythonscience

Resources

Readme
MIT license
Activity
Custom properties

Stars

189 stars

Watchers

12 watching

Forks

68 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.