Skip to content

build_from_hull TypeError: only integer scalar arrays can be converted to a scalar index #3

@chadmv

Description

@chadmv

I was getting the following error when creating from a hull:

api.py", line 328, in build_from_hull
# #     vertices = npPointList[indices]
# # TypeError: only integer scalar arrays can be converted to a scalar index

It can be fixed by used an np.array instead of regular Python list:

        npPointList = np.array([
            [self.points[i].x, self.points[i].y, self.points[i].z]
            for i in range(self.points.length())
        ])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions