int(np.log2(TPB)), int(math.log2(TPB)) within the function doesn't work while a hardcoded 3 [ie log2(8)] does. This was a pretty confusing bug for me! I think it might be helpful to flag this in the description of that puzzle.