diff --git a/adze/util.py b/adze/util.py index def8541..ed4b3d7 100644 --- a/adze/util.py +++ b/adze/util.py @@ -106,6 +106,8 @@ def find_faces(neighbors: NDArray[numpy.integer]) -> list[NDArray[numpy.intp]]: face, starting with the lowest index in the face. """ num_verts = neighbors.shape[0] + if num_verts == 0: + return [] edge_id = numpy.arange(3 * num_verts) v_start, nxt_edge = numpy.divmod(edge_id, 3) # arange % 3 is faster than tile