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