def matrixToString(matrix):
    """
    Transform a tuple of tuple of numbers into a string of format
    '[n,m]((x_11,x_12,...,x_1m),...,(x_n1,x_n2,...,x_nm))'.
    """
    nRows = len(matrix)
    if nRows == 0:
        return '[0,0](())'
    nCols = len(matrix[0])
    string = '[%d,%d](' % (nRows, nCols)
    for r in range(nRows):
        string += '('
        for c in range(nCols):
            string += str(float(matrix[r][c]))
            if c != nCols - 1:
                string += ','
        string += ')'
        if r != nRows - 1:
            string += ','
    string += ')'
    return string