def _has_unicode_fields(array):
 dtypes = (d[0] for d in array.dtype.fields.values())
 return any(((d.kind == 'U') for d in dtypes))

def _has_unicode_fields ( array ) : dtypes = ( d [ 0 ] for d in array . dtype . fields . values ( ) ) return any ( ( ( d . kind == 'U' ) for d in dtypes ) )
returns true if any fields in a structured array have unicode dtype .