On Sat, 17 May 2008 14:58:20 -0400, Anne Archibald wrote:
> numpy arrays are efficient, among other reasons, because they have
> homogeneous types. So all the elements in an array are the same type.
> (Yes, this means if you have an array of numbers only one of which
> happens to be complex, you h
2008/5/17 Zoho Vignochi <[EMAIL PROTECTED]>:
> hello:
>
> I am writing my own version of a dot product. Simple enough this way:
>
> def dot_r(a, b):
>return sum( x*y for (x,y) in izip(a, b) )
>
> However if both a and b are complex we need:
>
> def dot_c(a, b):
>return sum( x*y for
hello:
I am writing my own version of a dot product. Simple enough this way:
def dot_r(a, b):
return sum( x*y for (x,y) in izip(a, b) )
However if both a and b are complex we need:
def dot_c(a, b):
return sum( x*y for (x,y) in izip(a.conjugate(), b) ).real
I would like to combi