Skip to content

Commit

Permalink
[graphics] Fix issue #43; convert to integer in numpy array indices
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Mar 6, 2017
1 parent 939a10a commit 8c9a2d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion graphics/grabseeds.py
Expand Up @@ -530,7 +530,8 @@ def seeds(args):
npixels = int(props.area)
# Sample the center of the blob for color
d = min(int(round(minor / 2 * .35)) + 1, 50)
square = img[(y0 - d):(y0 + d), (x0 - d):(x0 + d)]
x0d, y0d = int(round(x0)), int(round(y0))
square = img[(y0d - d):(y0d + d), (x0d - d):(x0d + d)]
pixels = []
for row in square:
pixels.extend(row)
Expand Down

0 comments on commit 8c9a2d3

Please sign in to comment.