def binary_to_categorical(x):
    categorical = []
    for i in range(len(x)):
        if (not (1 in x[i])):
            categorical.append(0)
        else:
            i_where_one = np.where((x[i] == 1))[0][0]
            categorical.append(i_where_one)
    return categorical
def binary_to_categorical(x):
    categorical = []
    for i in range(len(x)):
        if (not (1 in x[i])):
            categorical.append(0)
        else:
            i_where_one = np.where((x[i] == 1))[0][0]
            categorical.append(i_where_one)
    return categorical