Moved as a bug report of PyPy: https://bugs.pypy.org/issue1543
As a temporary workaround, you can use complex(a[2].real, -a[2].imag)
.
문제
I have a problem with making complex conjugate of an element of an array in pypy. For example, running this code does not work:
from numpypy import *
a = array([1,2,3.4J],dtype=complex);
print a[2]
print a[2].conjugate()
This gives me a warning message as "unsupported operand type for conjugate: 'complex128'".
I tried this in numpy, which works without any problem.
Could anybody help me figure out what's wrong with this, and how I can fix this?
Best,
해결책
Moved as a bug report of PyPy: https://bugs.pypy.org/issue1543
As a temporary workaround, you can use complex(a[2].real, -a[2].imag)
.