I have the following two arrays:
array([154, 390, 635, 881], dtype=int64)
array([ 19, 25, 55, 95, 96, 100, 104, 125, 177, 191, 193, 209, 211,
215, 217, 220, 260, 262, 264, 268, 299, 371, 418, 454, 457, 460,
464, 467, 474, 476, 502, 504, 506, 511, 544, 615, 661, 707, 746,
748, 752, 757, 787, 853, 855, 856, 906, 945, 989, 998], dtype=int64)
I want a code that will create a third array or list that will contain values from the second array that are the first number that is larger than the values of the first i.e. 177, 418, 661 and 906.
I tried the following code:
for i in range(len(xi)):
newlist =[]
for j in range(len(peaks)):
if xi[i] > peaks[j] : newlist.append(xi[i])
j=j+1
but the answer is [998, 998, 998, 998] which is the largest number of the second array
what i should change in order to have the desired values?
Thank you
