def is_scalar(btype):
    """
    Is the given builtin type a scalar integer, float, boolean or string?
    """
    return (
        is_bool(btype)
        or is_int(btype)
        or is_float(btype)
        or is_str(btype)
        or is_complex(btype)
    )

    Is the given builtin type a scalar integer, float, boolean or string?
    
coremltools/converters/mil/mil/types/type_mapping.py