Live data from Hacker News

SymPy: Symbolic Mathematics in Python

sympy.org

1–10 of 137 posts

Re: SymPy: Symbolic Mathematics in Python

#2
SymPy: https://en.wikipedia.org/wiki/SymPy

- "How should logarithms be taught?" [with python and SymPy] https://news.ycombinator.com/item?id=28518565#28519356

From "SymPy - a Python library for symbolic mathematics" (2020) https://news.ycombinator.com/item?id=23767513 :

> NumPy for Matlab users: https://numpy.org/doc/stable/user/numpy-for-matlab-users.htm...

> SymPy vs Matlab: https://github.com/sympy/sympy/wiki/SymPy-vs.-Matlab

Re: SymPy: Symbolic Mathematics in Python

#3
For a numerical "physicist" (yes, the quotation marks are indispensable), Sympy was somewhat of a godsend to me. Great for prototyping even more advanced models before optimising them later on in C++.

I haven't used Mathematica much, but I have a feeling that it's still more symbolically powerful (or requires less wrangling) than SymPy? I'd appreciate if somebody with more experience in Mathematica could lay it out flat for me if that's the case.

Re: SymPy: Symbolic Mathematics in Python

#7

For a numerical "physicist" (yes, the quotation marks are indispensable), Sympy was somewhat of a godsend to me. Great for prototyping even more advanced models before optimising them later on in C++. I haven't used Mathematica much, but I have a feeling that it's still more symbolically powerful (or requires less wrangling) than SymPy? I'd appreciate if somebody with more experience in Mathematica could lay it out f…

Stephen Wolfram notwithstanding, Mathematica is still far ahead of most alternatives as a CAS. Maple is good on some integrals.

Their downsides are that their languages are not very well suited as general purpose languages, many times the algebraic manipulations you have to perform aren't that complicated and you'd rather work in a "real" language.

Yet another case where python isn't the best in class but still workable and able to benefit from its vast general-purpose ecosystem.

Re: SymPy: Symbolic Mathematics in Python

#8

SymPy gets the job done. I typically use it in the SageMath combo library, is that still the way to go or has SymPy advanced to the point that I should be using it on its own?

SageMath looks cool, but the fact that it's a combination of many different existing tools all with their own syntax, and feature overlap, scares me off a bit since it seems like how you do things wouldn't be very internally consistent

How does this aspect work out in practice?

Re: SymPy: Symbolic Mathematics in Python

#9
post #4

Sympy is amazing, but i kinda fail to see whats news about it as its oldest commit is 14 years ago.

I've never heard of it and I've been using Python since around 2008, including mathematical stuff like Scipy / Numpy. Sometimes people like to find old stuff and share it since it's new to others.

Re: SymPy: Symbolic Mathematics in Python

#10
post #7

For a numerical "physicist" (yes, the quotation marks are indispensable), Sympy was somewhat of a godsend to me. Great for prototyping even more advanced models before optimising them later on in C++. I haven't used Mathematica much, but I have a feeling that it's still more symbolically powerful (or requires less wrangling) than SymPy? I'd appreciate if somebody with more experience in Mathematica could lay it out f…

Stephen Wolfram notwithstanding, Mathematica is still far ahead of most alternatives as a CAS. Maple is good on some integrals. Their downsides are that their languages are not very well suited as general purpose languages, many times the algebraic manipulations you have to perform aren't that complicated and you'd rather work in a "real" language. Yet another case where python isn't the best in class but still worka…

Sagemath is a python library that has more capabilities than Mathematica. If you want to do real symbolic computation in python Sagemath is the only way to do it.

That said sympy is quite a cool little library for learning.

Post reply on HN