SHARE
TWEET

Untitled

a guest May 21st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import numpy as np
  2. # argmin returns the first encountered index having the minimum
  3. d = np.array([3,2,1,3,2,1,3]
  4. np.argmin(d)
  5. # why?
  6. # take a look at the help of argmin() ' "Notes" section
  7. help(np.argmin)
  8. #  Notes
  9. #   -----
  10. #   In case of multiple occurrences of the minimum values, the indices
  11. #   corresponding to the first occurrence are returned.
  12.  
  13. np.where(d == d.min()) # will work
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top