<br><br><div class="gmail_quote">On Tue, May 17, 2011 at 7:32 PM, Charles R Harris <span dir="ltr"><<a href="mailto:charlesr.harris@gmail.com">charlesr.harris@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><br><div class="gmail_quote"><div class="im">On Tue, May 17, 2011 at 6:47 PM, Wieland Brendel <span dir="ltr"><<a href="mailto:wielandbrendel@gmx.net" target="_blank">wielandbrendel@gmx.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Hello,<br>
I am encountering a very strange behaviour of einsum on my machine. I<br>
tracked the problem down to the following test code:<br>
<br>
from numpy import *<br>
<br>
T = random.random((3,10,10))<br>
W = random.random((3,10,7,275))<br>
<br>
print all(einsum('ij...,j...->i...',T[0],W[0]) + einsum('ij...,j...->i...',T[1],W[1]) + einsum('ij...,j...->i...',T[2],W[2]) - einsum('pij,pjts->its',T,W)<  1e-10)<br>
print sum(abs(einsum('ij...,j...->i...',T[0],W[0]) + einsum('ij...,j...->i...',T[1],W[1]) + einsum('ij...,j...->i...',T[2],W[2]) - einsum('pij,pjts->its',T,W)))<br>
<br>
On my machine the equality is not fulfilled. However, this depends,<br>
strange enough, on the dimensions of W: if the last dimension e.g. is<br>
500 instead of 275, things work again and the equality is fulfilled.<br>
<br></blockquote></div><div><br>The equality being that the expression should be ~0?<br><br>I see the problem when the last index is in the range 235 - 390.<br> <br></div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


Are you encountering similar problems or is this just my<br>
machine/installation?<br>
<br></blockquote></div><div><br>Out of curiosity, which machine/OS are you using? I'm on 64 bit fedora 14, AMD 940.<br><br></div></div></blockquote><div><br>Using<br><br>T = ones((2,8,8))<br>W = ones((2,8,8,i))<br><br>
The problem occurs for i in the closed ranges 129..204 and 257..341. The starting points look suspicious but the end points not so much. I think something isn't getting reset to zero.<br><br>Chuck<br></div></div>