Sum over the elements of an array
result = sum (Array_Type a [, Int_Type dim])
The sum function sums over the elements of a numeric array and
returns its result. If a second argument is given, then it
specifies the dimension of the array to be summed over. In this
case, an array of dimension one less than that of the input array
will be returned.
If the input array is an integer type, then the resulting value will
be a Double_Type. If the input array is a Float_Type,
then the result will be a Float_Type.
The mean of an array a of numbers is
|