From 418d7497e2897642229cafb1ade6f8b109748931 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 13 Dec 2016 20:24:49 +0800 Subject: utils/draw.py: Merge "_ellipse_in_shape()" to "ellipse()" * Fix the bug that "ellipse()" generate unexpected results. * Update the parameters of "ellipse()" also --- fg21sim/utils/grid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fg21sim/utils/grid.py') diff --git a/fg21sim/utils/grid.py b/fg21sim/utils/grid.py index a1d7d2c..b409a1b 100644 --- a/fg21sim/utils/grid.py +++ b/fg21sim/utils/grid.py @@ -135,7 +135,7 @@ def make_grid_ellipse(center, size, resolution, rotation=0.0): # Fill the ellipse into the grid r0, c0 = np.floor(np.array(shape) / 2.0).astype(np.int64) radii = np.ceil(0.5*np.array(size)/resolution).astype(np.int64) - rr, cc = ellipse(r0, c0, radii[0], radii[1], shape=shape) + rr, cc = ellipse((r0, c0), (radii[0], radii[1]), shape=shape) gridmap = np.zeros(shape) # XXX: ``numba`` only support one advanced index for ri, ci in zip(rr, cc): -- cgit v1.2.2