Unification Idea
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Thu May 10 12:45:18 EDT 2001
Thu, 10 May 2001 13:29:01 +0200, Alex Martelli <aleaxit at yahoo.com> pisze:
> I think a better "works now" solution might be:
>
> def conj(x):
> try: return x.conjugate()
> except AttributeError: return x
> map(conj, arr)
Or convert each number to complex before (function 'complex'),
if you don't mind having non-complex numbers promoted to complexes.
--
__("< Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK
More information about the Python-list
mailing list