ENH improve rand_int and rand_uniform