Re: [Numpy-discussion] OverflowError: long too big to convert

2007-05-01 Thread Charles R Harris
On 5/1/07, Mark.Miller <[EMAIL PROTECTED]> wrote: OK...so just for future reference...does a Numpy 'long' not directly correspond to a Python 'long'? No. A numpy long corresponds, more or less, to the C long long int. In [2]: array([1],dtype=long) Out[2]: array([1], dtype=int64) Chuck

Re: [Numpy-discussion] OverflowError: long too big to convert

2007-05-01 Thread Robert Kern
Mark.Miller wrote: > OK...so just for future reference...does a Numpy 'long' not directly > correspond to a Python 'long'? There is no Numpy "long", per se. There is a numpy.long symbol exposed, but it is just the builtin long type. However, numpy has no special support for Python's unbounded lon

Re: [Numpy-discussion] OverflowError: long too big to convert

2007-05-01 Thread Mark.Miller
OK...so just for future reference...does a Numpy 'long' not directly correspond to a Python 'long'? Robert Kern wrote: > Mark.Miller wrote: >> Can someone explain this? I can't seem to coerce numpy into storing >> large integer values. I'm sure that I'm just overlooking something >> simple...

Re: [Numpy-discussion] OverflowError: long too big to convert

2007-05-01 Thread Robert Kern
Mark.Miller wrote: > Can someone explain this? I can't seem to coerce numpy into storing > large integer values. I'm sure that I'm just overlooking something > simple... > > > >>> import numpy > >>> a='1'*300 > >>> type(a) > > >>> b=int(a) > >>> type(b) > > >>> c=numpy.empty((2,2),lon

[Numpy-discussion] OverflowError: long too big to convert

2007-05-01 Thread Mark.Miller
Can someone explain this? I can't seem to coerce numpy into storing large integer values. I'm sure that I'm just overlooking something simple... >>> import numpy >>> a='1'*300 >>> type(a) >>> b=int(a) >>> type(b) >>> c=numpy.empty((2,2),long) >>> c[:]=b Traceback (most recent call la