def _try_coerce_result(self, result):
if isinstance(result, np.ndarray):<EOL><INDENT>mask = isna(result)<EOL>if result.dtype.kind in ['<STR_LIT:i>', '<STR_LIT:f>']:<EOL><INDENT>result = result.astype('<STR_LIT>')<EOL><DEDENT>result[mask] = tslibs.iNaT<EOL><DEDENT>elif isinstance(result, (np.integer, np.float)):<EOL><INDENT>result = self._box_func(result)<EOL><DEDENT>return result<EOL>
reverse of try_coerce_args / try_operate