title: ValueError: attempt to get argmax of an empty sequence
body: <p>I get the following error when running the code below.</p>
  
  <blockquote>
    <p>ValueError: attempt to get argmax of an empty sequence</p>
  </blockquote>
  
  <p>The code is processing information from images sent to it from simulator.</p>
  
  <p>It runs well at first but when the array <code>Rover.nav_angles</code> is empty i get the error although there is an if condition</p>
  
  <pre><code>if Rover.nav_angles is not None:
          Max_angle_points=np.argmax(Rover.nav_angles)
          MAX_DIST=np.max(Rover.nav_dists[Max_angle_points])
  </code></pre>