Yeah, but we've got to do something :-).

Though now that you say that, it occurs that technically it would be better
to make 2.4 more restrictive, rather than less, so that stuff that works on
2.5+ is a superset of stuff that works on 2.4... so like we should use
isinstance(a, int) on 2.4 instead of what I said. Since people expect to do
some work to port stuff back to 2.4, but not so much the other way.

I guess it doesn't matter much though.

On Wed, Mar 6, 2013 at 10:45 PM, seberg <notifications@github.com> wrote:

> In numpy/random/mtrand/mtrand.pyx:
>
> > @@ -994,21 +995,24 @@ cdef class RandomState:
> >          """
> >
> >          # Format and Verify input
> > -        if isinstance(a, int):
> > -            if a > 0:
> > -                pop_size = a #population size
> > -            else:
> > +        a = np.array(a, copy=False)
> > +        if a.ndim == 0:
> > +            try:
> > +                # __index__ must return an integer by python rules.
> > +                pop_size = operator.index(a.item())
>
> Thanks for the tip, did that (I guess python2.4 will eat '3' now, but...)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/numpy/numpy/pull/3117/files#r3271399>
> .
>