Show / Hide Table of Contents

    Method tryFind

    static member tryFind: 'T -> Tensor<'T> -> int64 list option

    Finds the first occurence of the specfied value and returns its indices.

    Declaration
    static member tryFind: value:'T -> a:Tensor<'T> -> int64 list option
    Parameters
    Type Name Description
    'T value

    The value to find.

    Tensor<'T> a

    The tensor containing the source values.

    Returns
    Type Description
    int64 list option

    The indices if the value was found, otherwise None.

    Remarks

    The values is searched for an the index of the first occurence is returned. If the value is not found None 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.tryFind 3.0 a // b = Some [0L; 2L]
    See Also
    static member find: 'T -> Tensor<'T> -> int64 list
    static member findAxis: 'T -> int -> Tensor<'T> -> Tensor<int64>
    Back to top Generated by DocFX