def bool_to_indices(bool_tensor):
    """ Convert an array of boolean indices to integer indices"""
    indices_int = []
    for i in range(len(bool_tensor)):
        if bool_tensor[i]:
            indices_int.append(i)
    return indices_int