title: How do I find the index of the lowest value in Python?
body: <p>So I found the lowest value in my array using <code>val = np.argmin(R_abs)</code> in line 50, but now I'm trying to find the index of that value. I tried using <code>val_index = [idx for idx, minval in enumerate(R_abs) if minval == val]</code> in line 52, but I get an empty array. What am I doing wrong? I believe .list() only works for list. R_abs is an array.</p>
  <pre><code>R_abs = abs(R-atm_tropo)
  val = np.argmin(R_abs) # (line 50)
  # val_index = np.where(R_abs == val)
  val_index = [idx for idx, minval in enumerate(R_abs) if minval == val] # (line 52)
  </code></pre>