2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-27 19:12:16 +00:00
Files
python/example/tst_cmplx.py
Ralf W. Grosse-Kunstleve 3eb98f54a1 Mapping of std::complex<T> <-> Python complex.
[SVN r9305]
2001-02-21 08:01:54 +00:00

21 lines
278 B
Python

import cmplx
c = cmplx.dpolar(1, 1)
print c
print cmplx.dreal(c)
print cmplx.dimag(c)
c = cmplx.fpolar(1, 1)
print c
print cmplx.freal(c)
print cmplx.fimag(c)
print cmplx.dreal(c)
print cmplx.dimag(c)
try:
cmplx.freal("")
except TypeError:
pass
else:
raise SystemError