def unit_conversion(current_values, unit_type, current_unit, new_unit):
    """
    Converts given values between the specified units
    :param current_values: the current values that you want converted between units. It can be any type, so long as
    arithmetic operations with scalars behave appropriately. A numpy array will work; a list will not.
    :param unit_type: the type of unit (e.g. mixing ratio, length, mass) as a string
    :param current_unit: a string representing the current unit
    :param new_unit: a string representing the desired unit
    :return: the same type as current_values converted to be the new units
    """

    if not isinstance(unit_type, str):
        raise TypeError('unit_type must be a string')
    if not isinstance(current_unit, str):
        raise TypeError('current_unit must be a string')
    if not isinstance(new_unit, str):
        raise TypeError('new_unit must be a string')
    try:
        current_values + 1.0
        current_values - 1.0
        current_values * 1.0
        current_values / 1.0
    except:
        raise TypeError('Cannot perform one or more arithmetic operations on current_values')

    # Define the conversions here. conv_factors must be a dictionary where the keys are the units and the values are
    # the factor that multiplying the a base unit by converts it to the unit in question.
    if unit_type.lower() == 'mixing ratio' or unit_type.lower() == 'vmr':
        base_unit = 'ppp'
        conv_factors = {'ppp': 1.0, 'ppm': 1.0e6, 'ppmv': 1.0e6, 'ppb': 1.0e9, 'ppbv': 1.0e9, 'ppbC': 1.0e9}
    else:
        raise ValueError('Unit type "{0}" not recognized'.format(unit_type))

    if current_unit not in list(conv_factors.keys()):
        raise KeyError('{0} unit "{1}" not defined'.format(unit_type, current_unit))
    if new_unit not in list(conv_factors.keys()):
        raise KeyError('{0} unit "{1}" not defined'.format(unit_type, new_unit))

    return current_values * conv_factors[new_unit] / conv_factors[current_unit]