while j < np.size(time_list, 0) - time_interval:
    if not np.isnan(heights[j]) and not np.isnan(heights[j + time_interval]):
        axe_x.extend(time_list[np.arange(j + n, j + (time_interval - n))])
j += time_interval
TypeError: only integer arrays with one element can be converted to an index 3