TensorPrimitives.Average<T>(ReadOnlySpan<T>) メソッド

定義

指定した空でない数値テンソル内のすべての要素の平均を計算します。

public:
generic <typename T>
 where T : System::Numerics::INumberBase<T> static T Average(ReadOnlySpan<T> x);
public static T Average<T>(ReadOnlySpan<T> x) where T : System.Numerics.INumberBase<T>;
static member Average : ReadOnlySpan<'T (requires 'T :> System.Numerics.INumberBase<'T>)> -> 'T (requires 'T :> System.Numerics.INumberBase<'T>)
Public Shared Function Average(Of T As INumberBase(Of T)) (x As ReadOnlySpan(Of T)) As T

型パラメーター

T

パラメーター

x
ReadOnlySpan<T>

スパンとして表されるテンソル。

返品

T

x内のすべての要素の平均。

例外

xの長さは 0 より大きくする必要があります。

注釈

いずれかの入力値が NaN と等しい場合、結果の値も NaN になります。

適用対象