From 442b9f2af32dda8cf2e901a8df8e7d3baf44fb91 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Tue, 17 May 2016 09:43:14 +0200 Subject: [PATCH] Rename 'tmp' to something a bit more meaningful. Contributes to CURA-1512 --- cura/ConvexHullJob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/ConvexHullJob.py b/cura/ConvexHullJob.py index 92fcc66ecd..a60e6d339a 100644 --- a/cura/ConvexHullJob.py +++ b/cura/ConvexHullJob.py @@ -53,8 +53,8 @@ class ConvexHullJob(Job): # This basically finds the unique rows in the array by treating them as opaque groups of bytes # which are as long as the 2 float64s in each row, and giving this view to numpy.unique() to munch. # See http://stackoverflow.com/questions/16970982/find-unique-rows-in-numpy-array - tmp = numpy.ascontiguousarray(vertex_data).view(numpy.dtype((numpy.void, vertex_data.dtype.itemsize * vertex_data.shape[1]))) - _, idx = numpy.unique(tmp, return_index=True) + vertex_byte_view = numpy.ascontiguousarray(vertex_data).view(numpy.dtype((numpy.void, vertex_data.dtype.itemsize * vertex_data.shape[1]))) + _, idx = numpy.unique(vertex_byte_view, return_index=True) vertex_data = vertex_data[idx] # Select the unique rows by index. hull = Polygon(vertex_data)