sympy/sympy — pull request #1598 by mrocklin (2012-10-22 16:30:12+00:00)
Title: Simplify

This PR adds the following lines to the simplify function to make classes determine how they are simplified. This moves the meaning of simplify away from just Exprs to potentially work on any Basic.

try:
return expr._eval_simplify(ratio=ratio, measure=measure)
except AttributeError:
pass

This PR also gives such an `_eval_simplify` method to matrices.