def METHOD_NAME(array, air_pressure_axis=1):
    """Compute pressure level widths.
    For a 1D array with pressure level columns, return a 1D array with
    pressure level widths.
    """
    array = np.copy(array)
    if np.any(np.diff(array, axis=air_pressure_axis) > 0.0):
        raise ValueError("Pressure level value increased with height")
    # Calculate centers
    indices = [slice(None)] * array.ndim
    array_shifted = np.roll(array, -1, axis=air_pressure_axis)
    index_0 = deepcopy(indices)
    index_0[air_pressure_axis] = 0
    array_shifted[tuple(index_0)] = array[tuple(index_0)]
    index_neg1 = deepcopy(indices)
    index_neg1[air_pressure_axis] = -1
    index_neg2 = deepcopy(indices)
    index_neg2[air_pressure_axis] = -2
    array[tuple(index_neg2)] = array[tuple(index_neg1)]
    array_centers = (array + array_shifted) / 2.0
    index_range_neg1 = deepcopy(indices)
    index_range_neg1[air_pressure_axis] = slice(None, -1)
    array_centers = array_centers[tuple(index_range_neg1)]
    # Remove NaNs (replace them with surface pressure)
    dim_map = np.arange(array_centers.ndim)
    dim_map = np.delete(dim_map, air_pressure_axis)
    array_centers_surface = iris.util.broadcast_to_shape(
        array_centers[tuple(index_0)], array_centers.shape, dim_map)
    array_centers = np.where(np.isnan(array_centers), array_centers_surface,
                             array_centers)
    # Calculate level widths
    p_level_widths = -np.diff(array_centers, axis=air_pressure_axis)
    return p_level_widths