From 7228c81ef8d1dad92fa29eda7d4ced56bfe1b30e Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 3 Dec 2015 20:03:52 -0500 Subject: [PATCH] Remove the 'symbolic' module, there's no real use for it anymore. --- mjo/all.py | 1 - mjo/symbolic.py | 46 ---------------------------------------------- 2 files changed, 47 deletions(-) delete mode 100644 mjo/symbolic.py diff --git a/mjo/all.py b/mjo/all.py index 1a46f59..bff4e2c 100644 --- a/mjo/all.py +++ b/mjo/all.py @@ -16,4 +16,3 @@ from mjo.misc import * from mjo.orthogonal_polynomials import * from mjo.plot import * from mjo.symbol_sequence import * -from mjo.symbolic import * diff --git a/mjo/symbolic.py b/mjo/symbolic.py deleted file mode 100644 index 992260e..0000000 --- a/mjo/symbolic.py +++ /dev/null @@ -1,46 +0,0 @@ -from sage.all import * -from sage.interfaces.maxima_lib import maxima_lib -from sage.symbolic.expression import Expression - - -def set_simplification_domain(d): - """ - Set Maxima's simplification domain. - - INPUT: - - - ``d`` -- The domain, either 'real' or 'complex'. - - TESTS: - - With the default 'complex' domain, we don't simplify this:: - - sage: sqrt(x^2).simplify() - sqrt(x^2) - - But in the 'real' domain, we do:: - - sage: set_simplification_domain('real') - 'real' - sage: sqrt(x^2).simplify() - abs(x) - sage: set_simplification_domain('complex') - 'complex' - - """ - cmd = 'domain: %s;' % d - result = maxima_lib._eval_line(cmd) - return result - - -def safe_simplify(expr): - """ - What should be a totally safe simplification operation that works - a little better than the plain simplify(). - - Uses a top-level function because we can't monkey-patch Cython - classes. - """ - expr = expr.simplify_factorial() - expr = expr.simplify_log() - return expr -- 2.44.2