def reduce(op, in_array, out_array, axis=None, identity=None):
    """ Reduces an array according to an operation `op`, starting with 
        initial value `identity`, over the given axis (or all axes if none 
        given), to `out_array`.

        Requires `out_array` with one dimension less than `in_array`, or a 
        scalar if `axis` is None.
    """
    return None
