unique#

AxAngle.unique(return_index: bool = False, return_inverse: bool = False, ignore_zero: bool = True) 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. It also removes zero-entries which are assumed to be degenerate, unless ignore_zero is False.

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.

ignore_zero

If True, remove any all-zero elements.

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.