mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-21 12:50:27 +08:00
Explicitly cast upper_left and lower_right to ints
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user