def _match_error_to_data_set(x, ex):
<EOL>if not _fun.is_iterable(ex):<EOL><INDENT>if ex is None: ex = [ex]*len(x)<EOL>if _fun.is_a_number(ex): <EOL><INDENT>value = ex <EOL>ex    = []<EOL>for n in range(len(x)): <EOL><INDENT>ex.append([value]*len(x[n]))<EOL><DEDENT><DEDENT><DEDENT>if _fun.elements_are_numbers(ex) and len(ex) == len(x[<NUM_LIT:0>]): ex = [ex]*len(x)<EOL>for n in range(len(x)):<EOL><INDENT>if _fun.is_a_number(ex[n]): ex[n] = [ex[n]]*len(x[n])<EOL><DEDENT>return ex<EOL>
Inflates ex to match the dimensionality of x, "intelligently". 
x is assumed to be a 2D array.