def getDataType(p_type, p_size):
    """Given the input type and size, returns the corresponding
    Python character for that data type"""
    # How many bits in a single value?
    if p_type == 'float':
        if p_size == 32:
            return 'f'
        elif p_size == 64:
            return 'd'
        else:   # Anything else is an error.
            assert True, "Error: Cannot have floats and pixel size of " + str(p_size)
    elif p_type == 'signed fixed':
        if p_size == 8:
            return 'b'
        elif p_size == 16:
            return 'h'
        elif p_size == 32:
            return 'i'
        else:   # PIXSIZE of 64
            return 'q'
    else: # TYPE of unsigend
        if p_size == 8:
            return 'B'
        elif p_size == 16:
            return 'H'
        elif p_size == 32:
            return 'I'
        else:   # PIXSIZE of 64
            return 'Q'