aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/utils/grid.py
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-12-13 20:24:49 +0800
committerAaron LI <aaronly.me@outlook.com>2016-12-13 20:25:59 +0800
commit418d7497e2897642229cafb1ade6f8b109748931 (patch)
tree9e7970cd58bbe2aedcb0686786452297431a6d08 /fg21sim/utils/grid.py
parentec265bf97decce5dbabe05e648ac9d082e514c33 (diff)
downloadfg21sim-418d7497e2897642229cafb1ade6f8b109748931.tar.bz2
utils/draw.py: Merge "_ellipse_in_shape()" to "ellipse()"
* Fix the bug that "ellipse()" generate unexpected results. * Update the parameters of "ellipse()" also
Diffstat (limited to 'fg21sim/utils/grid.py')
-rw-r--r--fg21sim/utils/grid.py2
1 files changed, 1 insertions, 1 deletions
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):