Handle len(labels) == 1 in prf