R
RonnyM
Hi!
Need to vectorize this, but do not have a clue.
a = n*m matrix
x and y are n and m vectors
Suggestions?
def fill(a, x, y):
for i in range(1,a.shape[0]):
xp = x
for j in range(a.shape[1]):
yp = y[j]
a[i,j] = sin(xp*yp)*exp(-xp*yp) + a[i-1,j]
return a
Thanks in advance,
Ronny Mandal
Need to vectorize this, but do not have a clue.
a = n*m matrix
x and y are n and m vectors
Suggestions?
def fill(a, x, y):
for i in range(1,a.shape[0]):
xp = x
for j in range(a.shape[1]):
yp = y[j]
a[i,j] = sin(xp*yp)*exp(-xp*yp) + a[i-1,j]
return a
Thanks in advance,
Ronny Mandal