#NEWLINE# def blockinverse_1x1( expr ) : #NEWLINE# #INDENT# if ( isinstance ( expr . arg , BlockMatrix ) and ( expr . arg . blockshape == ( 1 , 1 ) ) ) : #NEWLINE# #INDENT# mat = Matrix ( [ [ expr . arg . blocks [ 0 ] . inverse ( ) ] ] ) #NEWLINE# return BlockMatrix ( mat ) #NEWLINE# #UNINDENT# return expr