title: TypeError: only integer arrays with one element can be converted to an index 3
body: <p>I'm having this error in the title, and don't know what's wrong. It's working when I use np.hstack instead of np.append, but I would like to make this faster, so use append.</p>
  
  <blockquote>
    <p>time_list a list of floats</p>
    
    <p>heights is a 1d np.array of floats</p>
  </blockquote>
  
  <pre><code>j = 0
  n = 30
  time_interval = 1200
  axe_x = []
  
  while j &lt; np.size(time_list,0)-time_interval:
      if (not np.isnan(heights[j])) and (not np.isnan(heights[j+time_interval])):
          axe_x.append(time_list[np.arange(j+n,j+(time_interval-n))])
  </code></pre>
  
  <hr>
  
  <pre><code> File "....", line .., in &lt;module&gt;
      axe_x.append(time_list[np.arange(j+n,j+(time_interval-n))])
  
  TypeError: only integer arrays with one element can be converted to an index
  </code></pre>