For example Country="US" and Type="Sales" is not exclusive with Type in ("Sales", "Purchase")
What would be an approach to solving this?
41–50 of 137 posts
For example Country="US" and Type="Sales" is not exclusive with Type in ("Sales", "Purchase")
What would be an approach to solving this?
Working in the field of robotics, I often have to write big vectors ( usually computed as the result of 3D transformations ) and then compute their Jacobian ( their derivative with respect to several state-variables ), which quickly becomes very nasty equations. I use sympy to (i) compute these big vectors, expressed in a very declarative way, (ii) compute the jacobian and (iii) export the results in C-code, immediat…
First write down the equations, then let SymPy do the laborious math part and turn the output into C code.
I'm guessing this is why you don't see a lot of SymPy projects in the wild. It was used for some intermediate calculations, and the results were turned into the product's code and the symbolic code is thrown away.
A decade ago when I was interested in General Relativity I wanted to write a simple program to handle symbolic calculations for Einstein field equations (Starting with metric and calculated affine connections, ricci tensor …etc.). Sympy was an option (better because python was the only language I know well) but I found it hard and actually couldn't make it work. I used mathematica which was new for me but did it in a…
Especially the print(latex(...)) command has helped a ton to write large matrices in notes for courses.
There is a benchmark of Sympy vs Mathematica at https://www.12000.org/my_notes/CAS_integration_tests/reports... The results were Mathematica failed to solve 1,523 problems, Sympy failed to solve 48,529. So it has some catching up to do.
Is there any GUI for SymPy one could easily use to solve symbolic math like Maple/Maxima/Macsyma?
Not sure what you mean with GUI, but you can use it with Jupyter notebooks.
There is a benchmark of Sympy vs Mathematica at https://www.12000.org/my_notes/CAS_integration_tests/reports... The results were Mathematica failed to solve 1,523 problems, Sympy failed to solve 48,529. So it has some catching up to do.
Do you know why there's such a big difference ? For example, is the way sympy does its job fundamentally flawed ?
As an open source project depending on volunteers (or is it just the one major author?) I am impressed that sympy does as much as it does.
SymPy is awesome indeed! I've been using it as a teaching tool for many years. IMHO, it's the best option as compared to Mathematica/Maple/etc. because the API functions match exactly the verbs students use when learning math (solve, expand, factor, etc.). Here is a little tutorial for anyone looking to get started: https://minireference.com/static/tutorials/sympy_tutorial.pd... Also available in runnable notebook fo…
As an aside - I have a bunch of logical expressions and I need to see if they are mutually exclusive. As in, if one is true given some combination of the variables, none of the other expressions must be true for the same combination. For example Country="US" and Type="Sales" is not exclusive with Type in ("Sales", "Purchase") What would be an approach to solving this?