Array.average<^T> Function (F#)
Returns the average of the elements in the array.
Namespace/Module Path: Microsoft.FSharp.Collections.Array
Assembly: FSharp.Core (in FSharp.Core.dll)
// Signature: Array.average : ^T  -> ^T (requires ^T with static member (+) and ^T with static member DivideByInt and ^T with static member Zero) // Usage: Array.average array
This function cannot be used directly on an array of integers since it requires that the type support an exact division operation, which is indicated by the constraint that the element type must support DivideByInt Floating point types support DivideByInt. To compute the average of an array of integers, see the example in Array.averageBy.
This function is named Average in compiled assemblies. If you are accessing the function from a language other than F#, or through reflection, use this name.
The following code shows how to use Array.average.
Average: 5.500000 Average: 5.500000