heat.array_api._set_functions

Module Contents

class UniqueInverseResult[source]

Bases: NamedTuple

Internal object for return type of unique_inverse.

values :heat.array_api._array_object.Array
inverse_indices :heat.array_api._array_object.Array
unique_inverse(x: heat.array_api._array_object.Array, /) UniqueInverseResult[source]

Returns the unique elements of an input array x and the indices from the set of unique elements that reconstruct x.

Parameters:

x (Array) – Input array. If x has more than one dimension, the function flattens x and returns the unique elements of the flattened array.

unique_values(x: heat.array_api._array_object.Array, /) heat.array_api._array_object.Array[source]

Returns the unique elements of an input array x.

Parameters:

x (Array) – Input array. If x has more than one dimension, the function flattens x and returns the unique elements of the flattened array.