Skip to content

Commit

Permalink
coerce float to int to fix numpy index error
Browse files Browse the repository at this point in the history
  • Loading branch information
njwilson23 committed Feb 12, 2017
1 parent 7e4c803 commit 95f2571
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions karta/raster/_gdal.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def __getitem__(self, idx):
for x in range(xstart, xend, xstep))

# compute size of output
outnx = ceil(float(abs(xend - xstart)) / abs(xstep))
outny = ceil(float(abs(yend - ystart)) / abs(ystep))
outnx = int(ceil(float(abs(xend - xstart)) / abs(xstep)))
outny = int(ceil(float(abs(yend - ystart)) / abs(ystep)))

pyt = pytype(t)
values_py = [struct.unpack(pyt, a) for a in values]
Expand Down

0 comments on commit 95f2571

Please sign in to comment.