unique#

Object3d.unique(return_index: bool = False, return_inverse: bool = False) Union[Tuple[Object3d, ndarray, ndarray], Tuple[Object3d, ndarray], Object3d][source]#

Return a new object containing only this object’s unique entries.

Unless overridden, this method returns the numerically unique entries. Also removes zero entries which are assumed to be degenerate.

Parameters:
return_index

If True, will also return the indices of the (flattened) data where the unique entries were found.

return_inverse

If True, will also return the indices to reconstruct the (flattened) data from the unique data.

Returns:
dat

The numerically unique entries.

idx

The indices of the unique data in the (flattened) array if return_index=True.

inv

The indices of the (flattened) data in the unique array if return_inverse=True.

Examples using Object3d.unique#