Method findAxis
static member findAxis: 'T -> int -> Tensor<'T> -> Tensor<int64>
Finds the first occurence of the specfied value along the specified axis and returns its index.
Declaration
static member findAxis: value:'T -> ax:int -> src:Tensor<'T> -> Tensor<int64>
Parameters
Type | Name | Description |
---|---|---|
'T | value | The value to find. |
int | ax | The axis to find the value along. |
Tensor<'T> | src | The tensor containing the source values. |
Returns
Type | Description |
---|---|
Tensor<int64> | A new tensor containing the indices of the first occurence of |
Remarks
The values is searched for an the index of the first occurence is returned. If the value is not found val NotFound is returned instead.
Examples
let a = HostTensor.ofList2D [[1.0; 2.0; 3.0; 4.0]
[5.0; 6.0; 7.0; 3.0]]
let b = Tensor.findAxis 3.0 1 a // b = [2L; 3L]