def _reconstruct_object(typ, obj, axes, dtype):
try:<EOL><INDENT>typ = typ.type<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT>res_t = np.result_type(obj.dtype, dtype)<EOL>if (not isinstance(typ, partial) and<EOL>issubclass(typ, pd.core.generic.PandasObject)):<EOL><INDENT>return typ(obj, dtype=res_t, **axes)<EOL><DEDENT>if hasattr(res_t, '<STR_LIT:type>') and typ == np.bool_ and res_t != np.bool_:<EOL><INDENT>ret_value = res_t.type(obj)<EOL><DEDENT>else:<EOL><INDENT>ret_value = typ(obj).astype(res_t)<EOL>if len(obj.shape) == <NUM_LIT:1> and len(obj) == <NUM_LIT:1>:<EOL><INDENT>if not isinstance(ret_value, np.ndarray):<EOL><INDENT>ret_value = np.array([ret_value]).astype(res_t)<EOL><DEDENT><DEDENT><DEDENT>return ret_value<EOL>
Reconstruct an object given its type, raw value, and possibly empty
    (None) axes.

    Parameters
    ----------
    typ : object
        A type
    obj : object
        The value to use in the type constructor
    axes : dict
        The axes to use to construct the resulting pandas object

    Returns
    -------
    ret : typ
        An object of type ``typ`` with the value `obj` and possible axes
        `axes`.