[Matrix-SIG] Problem with integer arrays?

David Ascher da@skivs.ski.org
Fri, 2 Oct 1998 14:45:23 -0700 (Pacific Daylight Time)


On Fri, 2 Oct 1998, Charles G Waldman wrote:

> Python 1.5 (#5, Sep 14 1998, 17:26:48)  [GCC 2.7.2.3] on linux2
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import Numeric
> >>> Numeric.__version__
> '1.4'
> >>> a = Numeric.array((0.,0.))
> >>> a**2
> array([ 0.,  0.])
> >>> a = Numeric.array((0,0))
> >>> a**2
> Traceback (innermost last):
>   File "<stdin>", line 1, in ?
> OverflowError: math range error

Strange -- it's not a problem for me:

~/py:> python
Python 1.5.1 (#0, Apr 13 1998, 20:22:04) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import Numeric
>>> Numeric.__version__
'1.4'
>>> a = Numeric.array((0.0,0.0))
>>> a**2
array([ 0.,  0.])
>>> a = Numeric.array((0,0))
>>> a**2
array([0, 0])