sympy/sympy — pull request #8137 by cbm755 (2014-09-28 23:04:28+00:00)
Title: MatExpr: Fix entry when power is zero and other cases

* `MatPow(A, 0)[0, 0]` would give an error because an empty list was
passed to MatMult. Fixed, added tests.
* Entries of `MatPow` of ImmutableMatrix added as a special case.
This fixes `.as_explicit` for MatPow of ImmutableMatrices, added
tests for this.
* Previously, `MatPow._entry` would return None if couldn't do it,
instead raise errors.
* Negative powers probably do-able in some cases, left comments.