def get_type(values):
    'Extract the type of a variable.\n\n    This function tries to determine the DAP type of a Python variable using\n    several methods. Returns the DAP type as a string.\n\n    '
    if hasattr(values, 'dtype'):
        return NUMPY_TO_DAP2_TYPEMAP[values.dtype.char]
    elif (isinstance(values, string_types) or (not isinstance(values, Iterable))):
        return type_convert(values)
    else:
        types = [type_convert(val) for val in values]
        precedence = ['String', 'Float64', 'Int32']
        types.sort(key=precedence.index)
        return types[0]
Extract the type of a variable.

This function tries to determine the DAP type of a Python variable using
several methods. Returns the DAP type as a string.
def get_type(values):
    'Extract the type of a variable.\n\n    This function tries to determine the DAP type of a Python variable using\n    several methods. Returns the DAP type as a string.\n\n    '
    if hasattr(values, 'dtype'):
        return NUMPY_TO_DAP2_TYPEMAP[values.dtype.char]
    elif (isinstance(values, string_types) or (not isinstance(values, Iterable))):
        return type_convert(values)
    else:
        types = [type_convert(val) for val in values]
        precedence = ['String', 'Float64', 'Int32']
        types.sort(key=precedence.index)
        return types[0]