Struct np.UniqueAllResult
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
The result of unique_all(NDArray): NumPy's UniqueAllResult namedtuple
(values, indices, inverse_indices, counts). Converts
implicitly to NDArray[], Deconstructs
(var (values, indices, inv, counts) = np.unique_all(x);) and indexes ([k]).
public readonly struct np.UniqueAllResult : INDArrayCarrier
- Implements
- Inherited Members
Properties
this[int]
The k-th output in NumPy field order: values, indices, inverse_indices, counts.
public NDArray this[int index] { get; }
Parameters
indexint
Property Value
Length
Number of outputs (always 4).
public int Length { get; }
Property Value
counts
The number of times each unique value appears in the input.
public NDArray counts { get; }
Property Value
indices
The index of the first occurrence (in the flattened input) of each unique value.
public NDArray indices { get; }
Property Value
inverse_indices
The indices into values that reconstruct the input, shaped like the input.
public NDArray inverse_indices { get; }
Property Value
values
The sorted unique values of the input.
public NDArray values { get; }
Property Value
Methods
Deconstruct(out NDArray, out NDArray, out NDArray, out NDArray)
Deconstructs into (values, indices, inverse_indices, counts).
public void Deconstruct(out NDArray values, out NDArray indices, out NDArray inverseIndices, out NDArray counts)
Parameters
ToArray()
Returns the outputs as an NDArray[] in NumPy field order.
public NDArray[] ToArray()
Returns
- NDArray[]
Operators
implicit operator NDArray[](UniqueAllResult)
Exposes the outputs — the tuple NumPy's unique_all returns.
public static implicit operator NDArray[](np.UniqueAllResult result)
Parameters
resultnp.UniqueAllResult
Returns
- NDArray[]