pysdic.PointCloud.keep_points_by_index#

PointCloud.keep_points_by_index(indices, *, propagate_properties=True)[source]#

Keep only the points with the given indices.

Note

The points keep their original order and duplicated indices are ignored: keep_points_by_index([2, 0]) returns the points 0 and 2, in this order.

Parameters:
  • indices (ArrayLike) – An integer array of shape \((R,)\) with the indices of the points to keep, in \([0, N_p)\).

  • propagate_properties (bool, optional (default: True)) – If False, the new point cloud has no properties.

Returns:

The point cloud with only the given points.

Return type:

pysdic.PointCloud

Raises:
  • TypeError – If the indices are not integers.

  • IndexError – If an index is out of \([0, N_p)\).