Lisandro Dalcin wrote: > On Tue, Oct 6, 2009 at 5:01 PM, Dag Sverre Seljebotn > <da...@student.matnat.uio.no> wrote: > >> Lisandro Dalcin wrote: >> >>> Well, I'm hacking on supporting C++ complex, but have some questions >>> >> I'm in a situation where the lack of .conjugate() is getting rather out >> of hand in my code -- I'd really like to have .conjugate() in Cython >> within the next week or so. >> >> If I step in now it might be a lot of unnecesarry merges though. When do >> you think you'll be done (or start)? >> >> > > It is mostly working on my box at work (at home right now)... I could > have something working by tomorrow > >> (Also something to keep in mind while working on the C++ support, i.e. >> there should probably be a macro for conjugate.) >> >> > > And also for abs(), in case it is not currently handled... > Hmm. Yes. However the argument is a bit harder:
import cmath z = 1 + 3j magnitude = abs(z) argument = cmath.phase(z) One could argue that we should not implement such a special case for cmath.phase yet but wait for function overloading in pxd files. Still it feels strange to provide an efficient way of getting the magnitude only and not the argument. Dag Sverre _______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev