def joinRes(lstPrfRes, varPar, idxPos, inFormat='<STR_LIT>'):
if inFormat == '<STR_LIT>':<EOL><INDENT>aryOut = np.zeros((<NUM_LIT:0>,))<EOL>for idxRes in range(<NUM_LIT:0>, varPar):<EOL><INDENT>aryOut = np.append(aryOut, lstPrfRes[idxRes][idxPos])<EOL><DEDENT><DEDENT>elif inFormat == '<STR_LIT>':<EOL><INDENT>aryOut = np.zeros((<NUM_LIT:0>, lstPrfRes[<NUM_LIT:0>][idxPos].shape[-<NUM_LIT:1>]))<EOL>for idxRes in range(<NUM_LIT:0>, varPar):<EOL><INDENT>aryOut = np.concatenate((aryOut, lstPrfRes[idxRes][idxPos]),<EOL>axis=<NUM_LIT:0>)<EOL><DEDENT><DEDENT>return aryOut<EOL>
Join results from different processing units (here cores).

    Parameters
    ----------
    lstPrfRes : list
        Output of results from parallelization.
    varPar : integer, positive
        Number of cores that were used during parallelization
    idxPos : integer, positive
        List position index that we expect the results to be collected to have.
    inFormat : string
        Specifies whether input will be 1d or 2d.

    Returns
    -------
    aryOut : numpy array
        Numpy array with results collected from different cores