[SciPy-dev] numpy - dot problem

Arnd Baecker arnd.baecker at web.de
Fri Jan 6 09:51:30 CST 2006


On Fri, 6 Jan 2006, Arnd Baecker wrote:

[...]

> But on an Itanium2 machine I get:
>
> In [1]: import numpy
> In [2]: numpy.__version__
> Out[2]: '0.9.3.1842'
> In [3]: numpy.test(10)
> Ran 179 tests in 1.591s
> In [4]: a1=numpy.array([], dtype=numpy.complex128)
> In [5]: a2=numpy.array([], dtype=numpy.complex128)
> In [6]: numpy.dot(a1,a2)
> Out[6]: (2.681561587629943e+154+2.6815615859888243e+154j)
>
> Repeated calls give different numbers
> In [8]: numpy.dot(a1,a2)
> Out[8]: (2.6815615885274171e+154+2.6815615859888243e+154j)
>
> Clearly, this is not correct.


In [1]: import numpy
In [2]: a1=numpy.array([])
In [3]: a2=numpy.array([])
In [4]: numpy.dot(a1,a2)
Out[4]: 2305843009217322368

In [5]: import numpy
In [6]: a1=numpy.array([], dtype=numpy.int8)
In [7]: a2=numpy.array([], dtype=numpy.int8)
In [8]: numpy.dot(a1,a2)
Out[8]: -112

So in spirit it does not depend on the type...




More information about the Scipy-dev mailing list