[SciPy-user] numarray.dot

Colin J. Williams cjw at sympatico.ca
Tue Aug 5 11:03:58 EDT 2003


This function appears to take only partial account of imaginary data, 
see the
second exeution below..

I would have expected a complex element type in a ComplexArray instance.
or a message that this type of input cannot be handled.

Colin W.

print 'version:', _sys.version

import numarray as N
z= N.dot([1, 2], [[3], [4]])
print 'z, type(z), z[0], z.type():', z, type(z), z[0], z.type()

z= N.dot([1, 2], [[3j], [4]])
print 'z, type(z), z[0], z.type():', z, type(z), z[0], z.type()

Results:

version: 2.3c2 (#45, Jul 24 2003, 21:23:54) [MSC v.1200 32 bit (Intel)]
z, type(z), z[0], z.type(): [11] <class 
'numarray.numarraycore.NumArray'> 11 Int32
z, type(z), z[0], z.type(): [ 8.] <class 
'numarray.numarraycore.NumArray'> 8.0 Float64





More information about the SciPy-User mailing list