Show / Hide Table of Contents

    Method diffAxis

    static member diffAxis: int -> Tensor<'T> -> Tensor<'T>

    Calculates the difference between adjoining elements along the specified axes.

    Declaration
    static member diffAxis: ax:int -> a:Tensor<'T> -> Tensor<'T>
    Parameters
    Type Name Description
    int ax

    The axis to operate along.

    Tensor<'T> a

    The tensor containing the source values.

    Returns
    Type Description
    Tensor<'T>

    The differences tensor. It has one element less in dimension ax as the input tensor.

    Remarks

    The resulting tensor has one element less in the differentiation dimension than the original tensor.

    Examples
     let a = HostTensor.zeros [10L; 5L]
     let b = Tensor.diffAxis 0 a // b.Shape = [9L; 5L]
    See Also
    static member diff: Tensor<'T> -> Tensor<'T>
    Back to top Generated by DocFX