now we have two arrays
a = [[1.,2.,3.,4.,5.,6.,7.,8.,9.],[9.,8.,7.,6.,5.,4.,3.,2.,1.]]
b = [[2.,2.,1.,2.,0.,2.,1.,2.,0.],[2.,2.,1.,2.,0.,2.,1.,2.,0.]]
Is there any fast way to achieve the following function: compare these two arrays by element, and change the array a[] in the following rule:
if a[i,j] > b[i,j]:
a[i,j] = a[i,j]
else
a[i,j] = 0
I know that a loop can do it, but I am wondering if there is any other faster way to do it.