I have a question regarding the performance of my python program. The part which is written down is very essential and I already increased the performance with numpy. I would like to know if it is possible to make this part even faster? A 10x speed up would already be nice..
u = numpy.zeros((a**l, a**l))
re = numpy.zeros((a**l, a**l, a**l))
wp = numpy.zeros((a**l, 2))
...Some code which edits u,re and wp...
for x in range(N):
wavg = numpy.dot(wp[:, 0], wp[:, 1])
wp[:, 0] = 1.0/wavg*numpy.dot(u, numpy.multiply(wp[:, 0], wp[:, 1]))
wp[:, 0] = numpy.tensordot(numpy.tensordot(re, wp[:, 0], axes=1), wp[:, 0],
axes=1)