Reduce

Adding reduce function to convert all array elements to a single scalar (or complex) value.