|
normals2D=numpy.delete(normals,1,1) |
In the line:
normals2D = numpy.delete(normals, 1, 1)
numpy.delete() creates a copy of the array and performs internal data shifting, which introduces unnecessary overhead. Since the goal here is simply to exclude the second column, a more efficient and readable alternative is to use column indexing directly:
normals2D = normals[:, [0, 2]]
This approach avoids extra memory allocation and improves clarity, especially in performance-critical operations.