def make_cubes_compatible(list_of_cubes): equalise_attributes(list_of_cubes) unify_time_units(list_of_cubes) for cube_i in list_of_cubes: cube_i.cell_methods = () c = 0 for i in range(len(list_of_cubes)): for j in range(i+1,len(list_of_cubes)): if( not list_of_cubes[i].is_compatible(list_of_cubes[j])): print('cubes {} and {}:\n'.format(i,j)) describe_diff(list_of_cubes[i],list_of_cubes[j]) c+=1 if c == 0: print("All cubes are now compatible.") else: print("{} incompatible cubes".format(c))
def _compare_result(self, cube_a, cube_b): result_strIO = StringIO.StringIO() describe_diff(cube_a, cube_b, output_file=result_strIO) return result_strIO.getvalue()
def _compare_result(self, cube_a, cube_b): result_sio = six.StringIO() describe_diff(cube_a, cube_b, output_file=result_sio) return result_sio.getvalue()
def _compare_result(self, cube_a, cube_b): result_bio = io.BytesIO() describe_diff(cube_a, cube_b, output_file=result_bio) return result_bio.getvalue()
def _compare_result(self, cube_a, cube_b): result_sio = StringIO() describe_diff(cube_a, cube_b, output_file=result_sio) return result_sio.getvalue()