INCF / csa

The Python implementation of the Connection-Set Algebra
GNU General Public License v3.0
13 stars 17 forks source link

python 3 error #10

Closed andrewgait closed 5 years ago

andrewgait commented 6 years ago

Running with python 3 leads to errors in the block(...) command.

Traceback (most recent call last): File "/localhome/mbbssag3/spinnaker/git/MySpiNNakerProblems/user_problems/test_csa_commands.py", line 59, in show (block (5,3) random (0.5)) File "/localhome/mbbssag3/.local/lib/python3.5/site-packages/csa/plot.py", line 44, in show for (i, j) in elementary.cross (range (N0), range (N1)) cset: File "/localhome/mbbssag3/.local/lib/python3.5/site-packages/csa/connset.py", line 726, in simpleIterator state): File "/localhome/mbbssag3/.local/lib/python3.5/site-packages/csa/_misc.py", line 184, in iterator (i, j) = next (maskIter) File "/localhome/mbbssag3/.local/lib/python3.5/site-packages/csa/_elementary.py", line 70, in iterator for j in range (low1, high1): TypeError: 'float' object cannot be interpreted as an integer

It can be fixed by editing csa/_misc.py lines 177-180 to use "//" rather than "/" for doing integer divides.

Christian-B commented 5 years ago

Is there a fix planned for this?

mdjurfeldt commented 5 years ago

Fixed in commit 2756f30.