INCF / csa

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

python3 grid2d problem #15

Closed andrewgait closed 5 years ago

andrewgait commented 5 years ago

Hello, the grid2d function (and perhaps other gridding functions too, I haven't checked them) are broken in python3 due to integer divides being different than in python2. To fix the grid2d function, lines 28-29 of geometry.py need to be changed to:

g = lambda i: \ (x0 + xScale * (i % width), y0 + yScale * (i // width))

and then everything seems to work correctly.

mdjurfeldt commented 5 years ago

Fixed in commit 29cf653.

Thank you!