# Buggy code
def log_interpolate_1d(x, xp, *args, **kwargs):
    r"""Interpolates data with logarithmic x-scale over a specified axis.

    Interpolation on a logarithmic x-scale for interpolation values in pressure coordintates.

    Parameters
    ----------
    x : array-like
        1-D array of desired interpolated values.

    xp : array-like
        The x-coordinates of the data points.

    args : array-like
        The data to be interpolated. Can be multiple arguments, all must be the same shape as
        xp.

    axis : int, optional
        The axis to interpolate over. Defaults to 0.

    fill_value: float, optional
        Specify handling of interpolation points out of data bounds. If None, will return
        ValueError if points are out of bounds. Defaults to nan.

    Returns
    -------
    array-like
        Interpolated values for each point with coordinates sorted in ascending order.

    Examples
    --------
     >>> x_log = np.array([1e3, 1e4, 1e5, 1e6])
     >>> y_log = np.log(x_log) * 2 + 3
     >>> x_interp = np.array([5e3, 5e4, 5e5])
     >>> metpy.calc.log_interp(x_interp, x_log, y_log)
     array([20.03438638, 24.63955657, 29.24472675])

    Notes
    -----
    xp and args must be the same shape.

    """
    # Pull out kwargs
    fill_value = kwargs.pop("fill_value", np.nan)
    axis = kwargs.pop("axis", 0)

    # Log x and xp
    log_x = np.log(x)
    log_xp = np.log(xp)
    return interpolate_1d(log_x, log_xp, *args, axis=axis, fill_value=fill_value)


# Traceback (TypeError)
/home/markmuetz/anaconda3/envs/metpy_v10.0_test_minimal/lib/python3.6/site-packages/pint/quantity.py:1377: UnitStrippedWarning: The unit of the quantity is stripped.
warnings.warn("The unit of the quantity is stripped.", UnitStrippedWarning)
Traceback (most recent call last):
File "cape_calc.py", line 92, in <module>
print(mpcalc.surface_based_cape_cin(p_profile * units('Pa'), T_profile * units('K'), Td_profile * units('degC')))
File "/home/markmuetz/projects/MetPy/metpy/xarray.py", line 381, in wrapper
return func(*args, **kwargs)
File "/home/markmuetz/projects/MetPy/metpy/units.py", line 305, in wrapper
return func(*args, **kwargs)
File "/home/markmuetz/projects/MetPy/metpy/calc/thermo.py", line 1652, in surface_based_cape_cin
p, t, td, profile = parcel_profile_with_lcl(pressure, temperature, dewpoint)
File "/home/markmuetz/projects/MetPy/metpy/xarray.py", line 381, in wrapper
return func(*args, **kwargs)
File "/home/markmuetz/projects/MetPy/metpy/units.py", line 305, in wrapper
return func(*args, **kwargs)
File "/home/markmuetz/projects/MetPy/metpy/calc/thermo.py", line 514, in parcel_profile_with_lcl
new_temp = _insert_lcl_level(pressure, temperature, p_lcl)
File "/home/markmuetz/projects/MetPy/metpy/calc/thermo.py", line 552, in _insert_lcl_level
interp_temp = interpolate_1d(lcl_pressure, pressure, temperature)
File "/home/markmuetz/projects/MetPy/metpy/xarray.py", line 381, in wrapper
return func(*args, **kwargs)
File "/home/markmuetz/anaconda3/envs/metpy_v10.0_test_minimal/lib/python3.6/site-packages/pint/registry_helpers.py", line 194, in wrapper
result = func(*new_values, **kw)
File "/home/markmuetz/projects/MetPy/metpy/interpolate/one_dimension.py", line 119, in interpolate_1d
variables = [arr[sorter] for arr in args]
File "/home/markmuetz/projects/MetPy/metpy/interpolate/one_dimension.py", line 119, in <listcomp>
variables = [arr[sorter] for arr in args]
TypeError: tuple indices must be integers or slices, not tuple

# Fixed code
def log_interpolate_1d(x, xp, *args, **kwargs):
    r"""Interpolates data with logarithmic x-scale over a specified axis.

    Interpolation on a logarithmic x-scale for interpolation values in pressure coordintates.

    Parameters
    ----------
    x : array-like
        1-D array of desired interpolated values.

    xp : array-like
        The x-coordinates of the data points.

    args : array-like
        The data to be interpolated. Can be multiple arguments, all must be the same shape as
        xp.

    axis : int, optional
        The axis to interpolate over. Defaults to 0.

    fill_value: float, optional
        Specify handling of interpolation points out of data bounds. If None, will return
        ValueError if points are out of bounds. Defaults to nan.

    Returns
    -------
    array-like
        Interpolated values for each point with coordinates sorted in ascending order.

    Examples
    --------
     >>> x_log = np.array([1e3, 1e4, 1e5, 1e6])
     >>> y_log = np.log(x_log) * 2 + 3
     >>> x_interp = np.array([5e3, 5e4, 5e5])
     >>> metpy.calc.log_interp(x_interp, x_log, y_log)
     array([20.03438638, 24.63955657, 29.24472675])

    Notes
    -----
    xp and args must be the same shape.

    """
    # Pull out kwargs
    fill_value = kwargs.pop("fill_value", np.nan)
    axis = kwargs.pop("axis", 0)

    # Handle units
    x, xp = _strip_matching_units(x, xp)

    # Log x and xp
    log_x = np.log(x)
    log_xp = np.log(xp)
    return interpolate_1d(log_x, log_xp, *args, axis=axis, fill_value=fill_value)