Problem with DiscreteUniform giving indices out of bounds

actually it does now work with Pymc2 but the coding is pretty ugly