def _get_cast_kind(kind0, kind1):
    """determine the kind to cast into
    """
    if kind0 == kind1:
        return kind0, True
    elif 'O' in (kind0, kind1):
        return 'O', False
    elif 'f' in (kind0, kind1):
        return 'f', True
    elif 'i' in (kind0, kind1):
        return 'i', True
    else:
        return 'O', False
