def compute_transpose(x):
    """ given a matrix, computes the transpose """
    xt=[([0]*len(x)) for k in x[0]]
    for i, x_row in enumerate(x):
        for j, b in enumerate(x_row):
            xt[j][i]=x[i][j]
    return xt