Explicitly cast upper_left and lower_right to ints

This commit is contained in:
bennlich
2015-06-24 08:46:57 -07:00
parent 84831fce87
commit 23670b4f02
+2 -2
View File
@@ -58,8 +58,8 @@ def ellipse(cy, cx, yradius, xradius, shape=None):
# The upper_left and lower_right corners of the
# smallest rectangle containing the ellipse.
upper_left = np.ceil(center - radiuses)
lower_right = np.floor(center + radiuses)
upper_left = np.ceil(center - radiuses).astype(int)
lower_right = np.floor(center + radiuses).astype(int)
if shape is not None:
# Constrain upper_left and lower_right by shape boundary.