#NEWLINE# def isNear( self , expr , val , places = 7 ) : #NEWLINE# #INDENT# 'assert that a symboltable symbol is near a particular value' #NEWLINE# testval = self . session . run ( expr ) #NEWLINE# if isinstance ( val , np . ndarray ) : #NEWLINE# #INDENT# for ( x , y ) in zip ( testval , val ) : #NEWLINE# #INDENT# self . assertAlmostEqual ( x , y , places = places ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return self . assertAlmostEqual ( testval , val , places = places )