def _try_coerce_result(self, result):
if isinstance(result, np.ndarray):<EOL><INDENT>if result.dtype.kind in ['<STR_LIT:i>', '<STR_LIT:f>']:<EOL><INDENT>result = result.astype('<STR_LIT>')<EOL><DEDENT><DEDENT>elif isinstance(result, (np.integer, np.float, np.datetime64)):<EOL><INDENT>result = self._box_func(result)<EOL><DEDENT>if isinstance(result, np.ndarray):<EOL><INDENT>if result.ndim > <NUM_LIT:1>:<EOL><INDENT>result = result.reshape(np.prod(result.shape))<EOL><DEDENT>result = self._holder._simple_new(result, freq=None,<EOL>dtype=self.values.dtype)<EOL><DEDENT>return result<EOL>
reverse of try_coerce_args