/tags/rel-1-3-26/SWIG/Examples/test-suite/python/complextest_runme.py
Python | 17 lines | 11 code | 6 blank | 0 comment | 3 complexity | 4e30274c02ac586b3ef44da4b3ab90d6 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- import complextest
- a = complex(-1,2)
- if complextest.Conj(a) != a.conjugate():
- raise RuntimeError, "bad complex mapping"
- if complextest.Conjf(a) != a.conjugate():
- raise RuntimeError, "bad complex mapping"
- v = (complex(1,2), complex(2,3), complex(4,3), 1)
- try:
- complextest.Copy_h(v)
- except:
- pass