indices in digitize can exceed length of number of bins by one