:mod:`heat.array_api._set_functions` ==================================== .. py:module:: heat.array_api._set_functions Module Contents --------------- .. py:class:: UniqueInverseResult Bases: :class:`NamedTuple` Internal object for return type of ``unique_inverse``. .. attribute:: values :annotation: :heat.array_api._array_object.Array .. attribute:: inverse_indices :annotation: :heat.array_api._array_object.Array .. role:: raw-html(raw) :format: html .. function:: unique_inverse(x: heat.array_api._array_object.Array, /) -> UniqueInverseResult Returns the unique elements of an input array ``x`` and the indices from the set of unique elements that reconstruct ``x``. :param x: Input array. If ``x`` has more than one dimension, the function flattens ``x`` and returns the unique elements of the flattened array. :type x: Array .. function:: unique_values(x: heat.array_api._array_object.Array, /) -> heat.array_api._array_object.Array Returns the unique elements of an input array ``x``. :param x: Input array. If ``x`` has more than one dimension, the function flattens ``x`` and returns the unique elements of the flattened array. :type x: Array