Quantcast
Channel: Keep the gradient flowing
Viewing all articles
Browse latest Browse all 195

Refine module, proof of concept

$
0
0

The 0.6.5 release of SymPy is taking longer than expected because some bugs in the testing framework, so my query module is not merged into trunk (yet). In the meantime, I am implementing a refine module (very little code is available yet). The refine module implements a refine() function (better names accepted) that would work in a very similar way as Mathematica's Refine (http://documents.wolfram.com/mathematica/functions/Refine). It tries to simplify an expression based on it's assumptions. For example: [cc lang="python"] >>> refine(abs(x), Assume(x, positive=True)) x >>> refine(abs(x), Assume(x, negative=True)) -x [/cc] Initial code is in my git repo, branch queries.


Viewing all articles
Browse latest Browse all 195