def print_KruskalWallisH(div_calc):
calc = defaultdict(list)<EOL>try:<EOL><INDENT>for k1, v1 in div_calc.items():<EOL><INDENT>for k2, v2 in v1.items():<EOL><INDENT>calc[k1].append(v2)<EOL><DEDENT><DEDENT><DEDENT>except:<EOL><INDENT>return "<STR_LIT>""<STR_LIT>"<EOL><DEDENT>h, p = stats.kruskal(*list(calc.values()))<EOL>print("<STR_LIT>".format(str(len(div_calc)), h))<EOL>print("<STR_LIT>".format(p))<EOL>
Compute the Kruskal-Wallis H-test for independent samples. A typical rule is that
each group must have at least 5 measurements.