From f4b8f513d450b2bc44c07e64d1bed63b32c4b4d9 Mon Sep 17 00:00:00 2001 From: jan Date: Fri, 8 Sep 2017 10:30:56 -0700 Subject: [PATCH] fix typos --- masque/shapes/polygon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/masque/shapes/polygon.py b/masque/shapes/polygon.py index 7de2183..74a0530 100644 --- a/masque/shapes/polygon.py +++ b/masque/shapes/polygon.py @@ -186,7 +186,7 @@ class Polygon(Shape): :return: List of Polygon objects """ import float_raster - xy_complex = self.vertices[:, 1] + 1j * self.vertices[:, 2] + xy_complex = self.vertices[:, 0] + 1j * self.vertices[:, 1] xy_cleaned = _clean_complex_vertices(xy_complex) xy = numpy.vstack((numpy.real(xy_cleaned)[None, :], numpy.imag(xy_cleaned)[None, :])) @@ -226,7 +226,7 @@ class Polygon(Shape): def _clean_complex_vertices(vertices: numpy.ndarray) -> numpy.ndarray: eps = numpy.finfo(vertices.dtype).eps - def cleanup(vertices): + def cleanup(v): # Remove duplicate points dv = v - numpy.roll(v, 1) v = v[numpy.abs(dv) > eps]