minor tuning

This commit is contained in:
jan 2018-03-28 21:33:16 -07:00
commit 5daf67ec7d

View file

@ -3,7 +3,7 @@ import numpy
from numpy.linalg import norm
from . import poly_t, plane_t
from .util import _get_map, find_components, find_faces
from .util import _get_maps, find_components, find_faces
try:
# Check if running with line_profiler
@ -178,7 +178,7 @@ def build_polyhedron(vertices: numpy.ndarray, faces: numpy.ndarray) -> poly_t:
for v in range(num_vertices):
v0 = start[v]
s = slice(v0, v0 + edges_per_vertex[v])
m, n = _get_map(neighbors[s, 2], neighbors[s, 1])
m, n = _get_maps(neighbors[s, 2], neighbors[s, 1])
neighbors[s, 0] = n + v0
neighbors[s, 2] = m + v0
@ -212,7 +212,7 @@ def build_polyhedron(vertices: numpy.ndarray, faces: numpy.ndarray) -> poly_t:
dst_mask[s:e] = target_vert[s:e] > v # mask out any references to verts >= current
dst_vert = target_vert[dst_mask]
ma, mb = _get_map(dst_vert, src_vert)
ma, mb = _get_maps(dst_vert, src_vert)
neighbors[dst_mask, 1] = numpy.where(src_mask)[0][mb]
neighbors[src_mask, 1] = numpy.where(dst_mask)[0][ma]