
Hi, It seems there is a problem when multiplying complex arrays, but maybe that is already solved for the new NumPy 17.3, is it? The product of complex arrays does not seem to be right. Code lines:
where the answer should be [[1+0j,2+0j,5+0j][10+0j,... ################################# Aureli Soria Frisch Fraunhofer IPK Dept. Pattern Recognition post: Pascalstr. 8-9, 10587 Berlin, Germany e-mail:aureli@ipk.fhg.de fon: +49 30 39 00 61 50 fax: +49 30 39 17 517 #################################

Hi,
It seems there is a problem when multiplying complex arrays, but maybe
From: "Aureli Soria Frisch" <Aureli.Soria_Frisch@ipk.fhg.de> that
This is your problem here. Array's differ from lists and such in that slicing does not produce a copy. 'a' and 'a_conj' point to the same data after this operation. One way to produce a copy is to use 'a = Numeric.array(a_conj)'
If you look at a_conj now, you should see that it is the same as a.
So what you have here is really a squared. So, you could get this to work by replacing slicing with array(a_conf). A much simpler way is: a = Numeric.conjugate(a_conj) a*a_conj #... Hope that clears things up for you. -tim

Hi,
It seems there is a problem when multiplying complex arrays, but maybe
From: "Aureli Soria Frisch" <Aureli.Soria_Frisch@ipk.fhg.de> that
This is your problem here. Array's differ from lists and such in that slicing does not produce a copy. 'a' and 'a_conj' point to the same data after this operation. One way to produce a copy is to use 'a = Numeric.array(a_conj)'
If you look at a_conj now, you should see that it is the same as a.
So what you have here is really a squared. So, you could get this to work by replacing slicing with array(a_conf). A much simpler way is: a = Numeric.conjugate(a_conj) a*a_conj #... Hope that clears things up for you. -tim
participants (2)
-
Aureli Soria Frisch
-
Tim Hochberg