def matrix_power(a, n): '''Raise matrix to given power ''' try: return _linalg.power(a, n) except Exception, e: raise LinAlgError(e)