get the mean from an array of numbers