def vec_to_midpoint(array):
    """
    Computes the midpoint between elements in an array.
    Args:
        array: (np.array)

    Returns: (np.array)

    """
    return (array[1:] + array[:-1]) / 2