def vividict_to_dict(vividict):
        """Helper method to create Python dicts from arbitrary Vividict objects

        :param Vividict vividict: A Vividict to be converted
        :return: A Python dict
        :rtype: dict
        """
        try:
            from numpy import ndarray
        except ImportError:
            ndarray = dict

        dictionary = {}

        def np_to_native(np_val):
            """Recursively convert numpy values to native Python values

            - Converts matrices to lists
            - Converts numpy.dtypes to float/int etc
            :param np_val: value to convert
            :return: value as native Python value
            """
            if isinstance(np_val, dict):
                for key, value in np_val.items():
                    np_val[key] = np_to_native(value)
            # The following condition cannot hold true if no numpy is installed, as ndarray is set to dict, which was
            # already handled in the previous condition
            elif isinstance(np_val, ndarray):
                # noinspection PyUnresolvedReferences
                np_val = np_val.tolist()
            if isinstance(np_val, (list, tuple)):
                native_list = [np_to_native(val) for val in np_val]
                if isinstance(np_val, tuple):
                    return tuple(native_list)
                return native_list
            if not hasattr(np_val, 'dtype'):  # Nothing to convert
                return np_val
            return np_val.item()  # Get the gloat/int etc value

        for key, value in vividict.items():
            # Convert numpy values to native Python values
            value = np_to_native(value)
            if isinstance(value, Vividict):
                value = Vividict.vividict_to_dict(value)
            dictionary[key] = value

        return dictionary
Helper method to create Python dicts from arbitrary Vividict objects

        :param Vividict vividict: A Vividict to be converted
        :return: A Python dict
        :rtype: dict