Skip to content

Commit

Permalink
Fix error with newer numpy.
Browse files Browse the repository at this point in the history
moreover, documentation to vectorize() says that it is slower than
direct iteration.
  • Loading branch information
portnov committed Nov 8, 2023
1 parent 418a4bf commit 082dde4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions utils/modules/polygon_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,7 @@ def np_process_polygons(verts, faces, func=None, dims=3, output_numpy=False):
np_faces = np.array(faces,dtype=object)

if np_faces.dtype == object:
np_len = np.vectorize(len)
lens = np_len(np_faces)
lens = np.array([len(i) for i in np_faces])
pol_types = np.unique(lens)
if dims == 1:
vals = np.zeros(np_faces.shape[0], dtype=float)
Expand Down

0 comments on commit 082dde4

Please sign in to comment.