Merge lp://staging/~exarkun/game/getTerrain-on-pypy into lp://staging/game
Status: | Needs review |
---|---|
Proposed branch: | lp://staging/~exarkun/game/getTerrain-on-pypy |
Merge into: | lp://staging/game |
Diff against target: |
16 lines (+3/-3) 1 file modified
gam3/network.py (+3/-3) |
To merge this branch: | bzr merge lp://staging/~exarkun/game/getTerrain-on-pypy |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Game Hackers | Pending | ||
Review via email: mp+238831@code.staging.launchpad.net |
Description of the change
This change fixes a test failure when the suite is run on PyPy:
```
[ERROR]
Traceback (most recent call last):
File "/tmp/game/
[args] = self.getCommand
exceptions.
gam3.test.
```
The cause is the difference in behavior of numpy on CPython vs PyPy when given float indexes. On CPython these are silently truncated to integers (the correct behavior in this case). On PyPy this usage is an error. Arguably this is a compatibility bug in PyPy's numpy - but using floats here is dumb and unintentional so it's worth fixing in Game anyway.
Unmerged revisions
- 51. By Jean-Paul Calderone
-
update to upstream
- 50. By Jean-Paul Calderone
-
Vector turns its values into floats. Turn them back into integers before using them in a known-integer context.