Attempting to use this on my matrix, I end up with the following results (D
is my matrix):
D.apply_map(simplify_full)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_61.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
-*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("RC5hcHBseV9tYXAoc2ltcGxpZnlfZnVsbCk="),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpKuOh6k/___code___.py", line 2, in <module>
exec compile(u'D.apply_map(simplify_full)
File "", line 1, in <module>
NameError: name 'simplify_full' is not defined
Then, trying this:
simplify_full(D)
I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_60.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
-*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("c2ltcGxpZnlfZnVsbChEKQ=="),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpP_fTpm/___code___.py", line 2, in <module>
exec compile(u'simplify_full(D)
File "", line 1, in <module>
NameError: name 'simplify_full' is not defined
Using simplify in both methods gives me the unsimplified results mentioned
in my first post.
I personally wish that sage simplify functions worked as follows:
simplify_rational and simplify_trig work as currently implemented.
simplify was renamed simplify_basic
Simplify was replaced with a new method/function that try/excepted the
algorithms in simplify_full, simplify_trig, simplify_rational then
simplify_basic, returning the first that succeeded.
I understand the need to provide functions that control the level of detail
used when simplifying complex problems.
However I'd assume that most basic/mid-level users just want the
expression/equation/object simplified with as little fiddly-ness as
possible. Currently I tend to call simplify_full on most problems - I.e.
simplify_full is my practical default rather than simplify.
Joal Heagney
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org