def compare_object_array(self, arr1, arr2, name, rows=None):
if rows is None:<EOL><INDENT>rows = arange(arr1.size)<EOL><DEDENT>for i,row in enumerate(rows):<EOL><INDENT>if (sys.version_info >= (<NUM_LIT:3>, <NUM_LIT:0>, <NUM_LIT:0>) and isinstance(arr2[i], bytes)) or isinstance(arr2[i], str):<EOL><INDENT>if sys.version_info >= (<NUM_LIT:3>, <NUM_LIT:0>, <NUM_LIT:0>) and isinstance(arr1[row], bytes):<EOL><INDENT>_arr1row = arr1[row].decode('<STR_LIT:ascii>')<EOL><DEDENT>else:<EOL><INDENT>_arr1row = arr1[row]<EOL><DEDENT>self.assertEqual(_arr1row,arr2[i],<EOL>"<STR_LIT>" % (name,i))<EOL><DEDENT>else:<EOL><INDENT>delement = arr2[i]<EOL>orig = arr1[row]<EOL>s=len(orig)<EOL>self.compare_array(orig, delement[<NUM_LIT:0>:s],<EOL>"<STR_LIT>" % (name,i))<EOL><DEDENT><DEDENT>
The first must be object