Re: [Numpy-discussion] int and long issues

2013-01-10 Thread Mads Ipsen
Sebastian - thanks - very helpful. Best regards, Mads On 10/01/2013 12:06, Sebastian Berg wrote: > On Thu, 2013-01-10 at 11:32 +0100, Mads Ipsen wrote: >> Hi, >> >> I find this to be a little strange: >> >> x = numpy.arange(10) >> isinstance(x[0],int) >> >> gives True >> >> y =

Re: [Numpy-discussion] int and long issues

2013-01-10 Thread Sebastian Berg
On Thu, 2013-01-10 at 11:32 +0100, Mads Ipsen wrote: > Hi, > > I find this to be a little strange: > > x = numpy.arange(10) > isinstance(x[0],int) > > gives True > > y = numpy.where(x < 5)[0] > isinstance(y[0],int) > > gives False > > isinstance(y[0],long) > Check what t

Re: [Numpy-discussion] int and long issues

2013-01-10 Thread Sebastian Berg
On Thu, 2013-01-10 at 11:32 +0100, Mads Ipsen wrote: > Hi, > > I find this to be a little strange: > > x = numpy.arange(10) > isinstance(x[0],int) > > gives True > > y = numpy.where(x < 5)[0] > isinstance(y[0],int) > > gives False > > isinstance(y[0],long) > Check what t

[Numpy-discussion] int and long issues

2013-01-10 Thread Mads Ipsen
Hi, I find this to be a little strange: x = numpy.arange(10) isinstance(x[0],int) gives True y = numpy.where(x < 5)[0] isinstance(y[0],int) gives False isinstance(y[0],long) gives True Specs: Python 2.7.2, numpy-1.6.1, Win7, 64 bit Best regards, Mads -- +