def as_dict(element):
    """
    Convert a numpy element into a dictionary.

    :param element: an element from a numpy array with named fields
    :type element: :class:`numpy.void`

    :return: a dictionary
    :rtype: dict
    """
    return {field: element[field] for field in element.dtype.names}