def _lookup_format(var):
    """
    Looks up relevant format in fits.

    Parameters
    ----------
    var : object
        An object to look up in the table

    Returns
    -------
    lookup : str
        The str describing the type of ``var``
    """
    lookup = {"<type 'int'>": 'J', "<type 'float'>": 'E',
        "<type 'numpy.int64'>": 'K', "<type 'numpy.float64'>": 'D',
        "<type 'numpy.float128'>": 'D', "<type 'str'>": '30A',
        "<type 'bool'": 'L'}
    form = type(var)
    try:
        return lookup[str(form)]
    except KeyError:
        return 'D'
