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 #17

Closed rowleya closed 4 years ago

rowleya commented 5 years ago

Another python 3 error occurs, demonstrated by the following code:

import csa

cset = csa.block(2, 5) * csa.random(0.5) * csa.random(0.3)
values = [x for x in csa.cross(range(10), range(10)) * cset]

The error is:

Traceback (most recent call last):
  File "csa_test.py", line 5, in <module>
    values = [x for x in csa.cross(range(10), range(10)) * cset]
  File "csa_test.py", line 5, in <listcomp>
    values = [x for x in csa.cross(range(10), range(10)) * cset]
  File "/usr/local/lib/python3.4/dist-packages/csa/connset.py", line 726, in simpleIterator
    state):
  File "/usr/local/lib/python3.4/dist-packages/csa/connset.py", line 379, in iterator
    (i1, j1) = next (iter1)
  File "/usr/local/lib/python3.4/dist-packages/csa/_misc.py", line 184, in iterator
    (i, j) = next (maskIter)
  File "/usr/local/lib/python3.4/dist-packages/csa/_elementary.py", line 70, in iterator
    for j in range (low1, high1):
TypeError: 'float' object cannot be interpreted as an integer
mdjurfeldt commented 4 years ago

I believe that this issue has been fixed in the master branch as well as version 0.1.10.

Closing.