def means2idxarrays(g1, g2, i_bins, c_bins, difference):

    if difference == "relative":
        # calculate difference between mean values for group1 and group2
        # g1 and g2 always the same length
        change = [g2[x] - g1[x] for x in range(0, len(g1))]
        initial = g1

    elif difference == "logfold":
        change = [np.log2((g2[x]+1.0) / (g1[x]+1.0))
                  for x in range(0, len(g1))]
        initial = [np.log2(g1[x]+1.0) for x in range(0, len(g1))]

    elif difference == "abs_logfold":
        change = [abs(np.log2((g2[x]+1.0) / (g1[x]+1.0)))
                  for x in range(0, len(g1))]
        initial = [max(np.log2(g1[x]+1.0), np.log2(g2[x]+1.0))
                   for x in range(0, len(g1))]

    # return arrays of len(change) with the index position in c_bins
    # corresponding to the bin in which the value of change falls
    change_idx = np.digitize(change, c_bins, right=True)
    initial_idx = np.digitize(initial, i_bins, right=True)

    return(change_idx, initial_idx)
Task.create: fails to create task.
dataset/ETHPy150Open CGATOxford/cgat/CGAT/Counts.py/means2idxarrays--crossover with--dataset/ETHPy150Open xtrementl/focus/tests/unit/test_task.py/TestTask.testTaskExists__create