def weld_variance(array, weld_type):
    """Returns the variance of the array.

    Parameters
    ----------
    array : numpy.ndarray or WeldObject
        Input array.
    weld_type : WeldType
        Type of each element in the input array.

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

    """
    weld_obj_mean = weld_mean(array, weld_type)

    obj_id, weld_obj = create_weld_object(array)
    weld_obj_mean_id = get_weld_obj_id(weld_obj, weld_obj_mean)

    weld_template = _weld_variance_code

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

    return weld_obj
Returns the variance of the array.

    Parameters
    ----------
    array : numpy.ndarray or WeldObject
        Input array.
    weld_type : WeldType
        Type of each element in the input array.

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