<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_weld_vec(weld_type, ndim):
 """Convert multi-dimensional data to WeldVec types. Parameters weld_type : WeldType WeldType of data. ndim : int Number of dimensions. Returns ------- WeldVec WeldVec of 1 or more dimensions. """

    for i in range(ndim):
        weld_type = WeldVec(weld_type)
    return weld_type