Aug-07-2019, 01:04 PM
(Aug-07-2019, 12:17 PM)paul18fr Wrote: is it what you're looking for?
(just adapt to your case)
n = 600; A = np.random.randint(100, size = (n,1), dtype = np.int); loc = np.where(A == 85); loc_exact = list(loc)[0];
Thanks but it doesn't quite achieve what I am looking for. It is tricky because if I adapt this code, the result I will get is 6 occurrences of 85 instead of 2 occurrences. I am still thinking :|