#NEWLINE# def __getitem__( self , idx ) : #NEWLINE# #INDENT# 'Return :class:`Mat` block with row and column given by ``idx``\n        or a given row of blocks.' #NEWLINE# try : #NEWLINE# #INDENT# ( i , j ) = idx #NEWLINE# return self . blocks [ i ] [ j ] #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# return self . blocks [ j ]