fix ValueError for nP(int, replacement=True)