#NEWLINE# def _cache_field( self , name , field ) : #NEWLINE# #INDENT# '\n        Do not store fields in _converted if one of its bases is self,\n        or if it has a common base with self.\n\n        This results in a reference cycle that cannot be broken since\n        ndarrays do not participate in cyclic garbage collection.\n        ' #NEWLINE# base = field #NEWLINE# while True : #NEWLINE# #INDENT# self_base = self #NEWLINE# while True : #NEWLINE# #INDENT# if ( self_base is base ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( getattr ( self_base , 'base' , None ) is not None ) : #NEWLINE# #INDENT# self_base = self_base . base #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# if ( getattr ( base , 'base' , None ) is not None ) : #NEWLINE# #INDENT# base = base . base #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# self . _converted [ name ] = field