How do I write the following loop using Python's implicit looping?
def kl(myA, myB, a, b):
lots of stuff that assumes all inputs are scalars
x, y = meshgrid(inclusive_arange(0.0, xsize, 0.10),\
inclusive_arange(0.0, ysize, 0.10))
for j in range(x.shape[0]):
for i in range(x.shape[1]):
z[j, i] = kl(x[j, i], y[j, i])
I want to do something like
z = kl(x, y)
but that gives:
TypeError: only length-1 arrays can be converted to Python scalars