Suppose I have two arrays
array1=np.array([1,2,3,4,5,6,7,8,9,10])
array2=np.array([11,1,2,4,10,60,0,3,20,33])
I want to compare the two arrays and store the values that are bigger. I want to write a code that will check the first element of array1 with the first element of array2 and store the greatest value between them in a new array and so on.
I tried it with this code
array3=[]
i=0
while i<=len(array1):
if array1[i]>array2[i]:
array3.append(i)
However, the code doesn't give any output and keeps on running. The two array in question that i want to work with are very big so will a normal loop method work for big arrays as well?
