homogenize_numpy

compas.geometry.homogenize_numpy(points, w=1.0)[source]

Dehomogenizes points or vectors.

Parameters

points (list of Points or list of Vectors)

Returns

numpy.ndarray

Examples

>>> points = [[1, 1, 1], [0, 1, 0], [1, 0, 0]]
>>> res = homogenize_numpy(points, w=1.0)
>>> np.allclose(res, [[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 0.0, 1.0], [1.0, -0.0, 0.0, 1.0]])
True