def __str__(self):
if masked_print_option.enabled():<EOL><INDENT>f = masked_print_option<EOL>if self is masked:<EOL><INDENT>return str(f)<EOL><DEDENT>m = self._mask<EOL>if m is nomask:<EOL><INDENT>res = self._data<EOL><DEDENT>else:<EOL><INDENT>if m.shape == ():<EOL><INDENT>if m.dtype.names:<EOL><INDENT>m = m.view((bool, len(m.dtype)))<EOL>if m.any():<EOL><INDENT>return str(tuple((f if _m else _d) for _d, _m in<EOL>zip(self._data.tolist(), m)))<EOL><DEDENT>else:<EOL><INDENT>return str(self._data)<EOL><DEDENT><DEDENT>elif m:<EOL><INDENT>return str(f)<EOL><DEDENT>else:<EOL><INDENT>return str(self._data)<EOL><DEDENT><DEDENT>names = self.dtype.names<EOL>if names is None:<EOL><INDENT>res = self._data.astype("<STR_LIT:O>")<EOL>res.view(ndarray)[m] = f<EOL><DEDENT>else:<EOL><INDENT>rdtype = _recursive_make_descr(self.dtype, "<STR_LIT:O>")<EOL>res = self._data.astype(rdtype)<EOL>_recursive_printoption(res, m, f)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>res = self.filled(self.fill_value)<EOL><DEDENT>return str(res)<EOL>
String representation.