#NEWLINE# def __new__( cls , base , exp ) : #NEWLINE# #INDENT# base = _sympify ( base ) #NEWLINE# if ( not base . is_Matrix ) : #NEWLINE# #INDENT# raise TypeError ( 'Function parameter should be a matrix' ) #NEWLINE# #UNINDENT# exp = _sympify ( exp ) #NEWLINE# return super ( MatPow , cls ) . __new__ ( base , base , exp )