Skip to content

Commit 233f8fb

Browse files
committed
Correct vertex-index methods naming
1 parent 6946eb4 commit 233f8fb

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/compas/datastructures/halfface/halfface.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,34 +322,30 @@ def cell_sample(self, size=1):
322322
"""
323323
return sample(list(self.cells()), size)
324324

325-
def key_index(self):
325+
def vertex_index(self):
326326
"""Returns a dictionary that maps vertex dictionary keys to the
327327
corresponding index in a vertex list or array.
328328
329329
Returns
330330
-------
331331
dict[int, int]
332-
A dictionary of key-index pairs.
332+
A dictionary of vertex-index pairs.
333333
334334
"""
335335
return {key: index for index, key in enumerate(self.vertices())}
336336

337-
vertex_index = key_index
338-
339-
def index_key(self):
337+
def index_vertex(self):
340338
"""Returns a dictionary that maps the indices of a vertex list to
341339
keys in a vertex dictionary.
342340
343341
Returns
344342
-------
345343
dict[int, int]
346-
A dictionary of index-key pairs.
344+
A dictionary of index-vertex pairs.
347345
348346
"""
349347
return dict(enumerate(self.vertices()))
350348

351-
index_vertex = index_key
352-
353349
# --------------------------------------------------------------------------
354350
# builders
355351
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)