Reversed the prior commit- changed the return value of "mean" to "T" type.

This will be needed when the type is complex.