#NEWLINE# def _repr_html_( self ) : #NEWLINE# #INDENT# 'IPython display protocol: HTML representation.\n\n        The IPython display protocol calls this method to get the HTML\n        representation of this object.\n        ' #NEWLINE# html = ( '<table border="1" cellpadding="3" cellspacing="0" ' + ' style="border:1px solid black;border-collapse:collapse;">' ) #NEWLINE# for ( row , row_data ) in enumerate ( self . array ) : #NEWLINE# #INDENT# html += '<tr>' #NEWLINE# for ( column , item ) in enumerate ( row_data ) : #NEWLINE# #INDENT# if ( not _key_is_valid ( self . _cell_styles [ row ] [ column ] , 'suppress' ) ) : #NEWLINE# #INDENT# item_html = self . _formatter ( style_html , self . _cell_styles [ row ] [ column ] ) #NEWLINE# if _key_is_valid ( self . _cell_styles [ row ] [ column ] , 'bold' ) : #NEWLINE# #INDENT# item_html = ( ( '<b>' + item_html ) + '</b>' ) #NEWLINE# #UNINDENT# if _key_is_valid ( self . _cell_styles [ row ] [ column ] , 'italic' ) : #NEWLINE# #INDENT# item_html = ( ( '<i>' + item_html ) + '</i>' ) #NEWLINE# #UNINDENT# style_html = self . _get_style_html ( self . _cell_styles [ row ] [ column ] ) #NEWLINE# html += ( ( ( ( '<td' + style_html ) + '>' ) + item_html ) + '</td>' ) #NEWLINE# #UNINDENT# #UNINDENT# html += '</tr>' #NEWLINE# #UNINDENT# html += '</table>' #NEWLINE# return html