Returns operation on the elements in the array.

    Arguments
    ---------
    array : WeldObject or numpy.ndarray
        Input array.
    weld_type : WeldType
        Weld type of each element in the input array.
    operation : {'+', '*', 'min', 'max'}
        Operation to apply.

    Returns
    -------
    WeldObject
        Representation of this computation.

def weld_aggregate(array, weld_type, operation):
    """Returns operation on the elements in the array.

    Arguments
    ---------
    array : WeldObject or numpy.ndarray
        Input array.
    weld_type : WeldType
        Weld type of each element in the input array.
    operation : {'+', '*', 'min', 'max'}
        Operation to apply.

    Returns
    -------
    WeldObject
        Representation of this computation.

    """
    obj_id, weld_obj = create_weld_object(array)

    weld_template = _weld_aggregate_code

    weld_obj.weld_code = weld_template.format(array=obj_id,
                                              type=weld_type,
                                              operation=operation)

    return weld_obj