SymPy: Symbolic computing in Python
By Aaron Meurer, Christopher P. Smith, Mateusz Paprocki, O. Certík, S. B. Kirpichev, Matthew Rocklin, Amit Kumar, Sergiu Ivanov, J. K. Moore, Sartaj Singh and 17 more. 2017
1,980 citations recorded by the source corpus.
SymPy is an open source computer algebra system written in pure Python. It is built with a focus on extensibility and ease of use, through both interactive and programmatic applications. These characteristics have led SymPy to become the standard symbolic library for the scientific Python ecosystem. This paper presents the architecture of SymPy, a description of its features, and a discussion of select domain specific submodules. The supplementary materials provide additional examples and further outline details of the architecture and features of SymPy.
Subfields: Artificial Intelligence, Hardware and Architecture, Program Analysis & Verification
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Mohit Bansal
- Quoc V. Le
- Luke S. Zettlemoyer
- Graham Neubig
- Jianfeng Gao
- Percy Liang
- Yoshua Bengio
- Kyunghyun Cho
In Hardware and Architecture
- J. Vanderplas
- Yuhuai Wu
- Orhan Firat
- Oyvind Tafjord
- Pushmeet Kohli
- Ian Henriksen
- Guillaume Lample
- Micah Goldblum
In Program Analysis & Verification
- Pushmeet Kohli
- Michele Catasta
- Guillaume Lample
- Edward Grefenstette
- Oleksandr Polozov
- Yuhuai Wu
- Oyvind Tafjord
- Ronan Le Bras
Citations in the corpus
- Solving Quantitative Reasoning Problems with Language Models (2022, methodology): “To evaluate correctness, we parse the final answers and compare them using the SymPy library [43].”
- SciPy 1.0: fundamental algorithms for scientific computing in Python (2019, methodology): “…cover Bayesian statistics and probabilistic modeling. scikit-image 4 provides image processing capabilities beyond SciPy’s ndimage , SymPy 48 provides a Python interface for symbolic computation, and sparse.csgraph and spatial offer basic tools for working with graphs and networks…”
- Analysing Mathematical Reasoning Abilities of Neural Models (2019, methodology): “Mathematical equations are formatted according to Python/SymPy (Meurer et al., 2017) conventions (for example, ** is used for power rather than ˆ ); these rules are consistent for all modules.”
- PaLM 2 Technical Report (2023, methodology): “We use the SymPy library (Meurer et al., 2017) to compare answers and guard against false negatives, which arise from equivalent answers with different surface forms.”
- Deep Learning for Symbolic Mathematics (2019, methodology): “However, we observed that the FWD -trained model is sometimes able to compute the integral of functions that SymPy cannot compute.”
- LiveBench: A Challenging, Contamination-Free LLM Benchmark (2024, methodology): “We judge the correctness of answers as in the EleutherAI Eval Harness [22] using Sympy [40] where we check for semantic as well as numerical equivalence of mathematical expressions.”
- SciPy 1.0-Fundamental Algorithms for Scientific Computing in Python (2019, methodology): “…cover Bayesian statistics and probabilistic modeling. scikit-image 4 provides image processing capabilities beyond SciPy’s ndimage , SymPy 48 provides a Python interface for symbolic computation, and sparse.csgraph and spatial offer basic tools for working with graphs and networks…”
- TM-generation model: a template-based method for automatically solving mathematical word problems (2021, methodology): “We calculated the answer of an equation using the Python library SymPy [24].”
- The Astropy Project: Sustaining and Growing a Community-oriented Open-source Project and the Latest Major Release (v5.0) of the Core Package (2022, background): “…pymc3 (Salvatier et al. 2016), and emcee (Foreman-Mackey et al. 2013), domain-specific libraries like yt (Turk et al. 2011), plasmpy (PlasmaPy Community et al. 2021), sunpy (SunPy Community et al. 2020), Biopython (Cock et al. 2009), and sympy (Meurer et al. 2017), to name a few in each category.”
- Brian 2: an intuitive and efficient neural simulator (2019, methodology): “To this end, the user-provided equations are analysed symbolically using the Python package sympy (Meurer et al., 2017), and transformed into a sequence of operations to advance the system’s state by a single time step (for more details, see Stimberg et al., 2014).”
- Deep symbolic regression: Recovering mathematical expressions from data via risk-seeking policy gradients (2019, methodology): “We use the strictest definition of recovery: exact symbolic equivalence, as determined using a computer algebra system, e.g. SymPy (Meurer et al., 2017).”
- TÜLU 3: Pushing Frontiers in Open Language Model Post-Training (2024, positive): “In addition, we parse both using the SymPy [Meurer et al., 2017] package and compare the equivalence of the parsed outputs to check their mathematical equivalent.”
- Herwig 7.2 release note (2019, methodology): “We now make use of the sympy package [17] to allow us to write code capable of evaluating the HELAS building blocks for arbitrary Lorentz structures.”
- Modules for Experiments in Stellar Astrophysics (MESA): Time-dependent Convection, Energy Conservation, Automatic Differentiation, and Infrastructure (2022, methodology): “dF_drho1 = x0 / rho1 dF_drho0 = -T1 * x0 / (2 * sqrt(rho0)) dF_dT1 = x0/sqrt(rho0) dF_dr2 = 0 dF_dr1 = 0 else dF_drho1 = 0 dF_drho0 = 0 dF_T1 = 0 dF_dr2 = sinh(r2-r1) dF_dr1 = -sinh(r2-r1) end if The auto diff module provides overloaded operators that were generated using the SymPy (Meurer et al. 20”