Menu

#7 Examples/scarves.py broken in rc-0-8

open
nobody
None
5
2011-03-29
2011-03-29
Ted Bach
No

Traceback (most recent call last):
File "Examples/scarves.py", line 55, in <module>
Randomize()
File "Examples/scarves.py", line 47, in Randomize
q[:] = makedist(q.shape,[1,1])
File "/usr/local/lib/python2.6/dist-packages/simp/step.py", line 172, in __setitem__
Write(index,[self],[value])()
File "/usr/local/lib/python2.6/dist-packages/simp/step.py", line 734, in __init__
RWOp.__init__(self,region,signals)
File "/usr/local/lib/python2.6/dist-packages/simp/step.py", line 577, in __init__
self.region = LatticeArrayRegion(region,rep)
File "/usr/local/lib/python2.6/dist-packages/simp/latticearray.py", line 519, in __init__
stop_ = stop_%size[i]
TypeError: unsupported operand type(s) for %: 'long' and 'numpy.int32'

Discussion

  • Silvio Capobianco

    This is the same error returned by diffusion1d.py (related to coin.shape instead of q.shape).
    However, parity1d.py goes OK.

     
  • Silvio Capobianco

    It actually looks like a problem with type assignment to the arguments of the makedist function. (OK, this I got from Monsieur de La Palice.)
    For some reason I don't know, it works with 2D arrays, e.g. life, but not on 1D ones such as scarves and diffusion1d.
    I'll browse some of the source code, hope I can get some ideas...
    BTW: regarding my previous report, parity1d works precisely because it does NOT use makedist.

     

Log in to post a comment.