This is my code. I would like to avoid `for` loop for huge number of iterations.

```
iterations = 10000
max_number = 9700
W = is a matrix(300,9700)

def grad_function(x,y):
    grad = np.sum(W*(x - y))
    return grad

x = np.arange(300)
y = np.arange(9700)

for i in range (iterations):
    for j in range(max_number):
        result = grad_function(x,y)
print(result)

```

I tried using the `map()` function instead but it does not give me a result including 9700 elements; instead, it gives me a list of 300 elements which is not correct.