Show / Hide Table of Contents

    Method countTrueAxis

    static member countTrueAxis: int -> Tensor<bool> -> Tensor<int64>

    Counts the elements being true along the specified axis.

    Declaration
    static member countTrueAxis: ax:int -> src:Tensor<bool> -> Tensor<int64>
    Parameters
    Type Name Description
    int ax

    The axis the count along.

    Tensor<bool> src

    The tensor containing the source values.

    Returns
    Type Description
    Tensor<int64>

    A new tensor containing the result of this operation.

    Remarks

    The number of elements that are true is accumulated along the specified axis.

    Examples
     let a = HostTensor.ofList2D [[true; false; true; false]
                                  [false; true; true; false]]
     let b = Tensor.countTrueAxis 1 a // b = [2L; 2L]
    See Also
    member FillCountTrueAxis: int -> Tensor<bool> -> unit
    static member countTrue: Tensor<bool> -> int64
    Back to top Generated by DocFX