def convert_data_back(data, d, m, n):
    """ Helper function to convert data back to the original shape which is 
    determined by the values of d, m and n (outputs of :func: convert_data).
    """
    if d == 2:
        data = data.reshape(m, n)
    return data
