def split_vector_ctype(ctype):
    """Split a vector ctype into a raw ctype and the vector length.

    If the given ctype is not a vector type, we raise an error. I

    Args:
         ctype (str): the ctype to possibly split into a raw ctype and the vector length

    Returns:
        tuple: the raw ctype and the vector length
    """
    if not is_vector_ctype(ctype):
        raise ValueError('The given ctype is not a vector type.')
    for vector_length in [2, 3, 4, 8, 16]:
        if ctype.endswith(str(vector_length)):
            vector_str_len = len(str(vector_length))
            return ctype[:-vector_str_len], int(ctype[-vector_str_len:])
Split a vector ctype into a raw ctype and the vector length.

    If the given ctype is not a vector type, we raise an error. I

    Args:
         ctype (str): the ctype to possibly split into a raw ctype and the vector length

    Returns:
        tuple: the raw ctype and the vector length