Closed rezah closed 7 years ago
Overloading in C++ doesn't translate directly to pyUni10
interface due to the limitation of Swig, so the UniTensor(uni10.RTYPE, xxx)
interfaces are not exposed in pyUni10
and it will be mapped to UniTensor(uni10.CTYPE, xxx)
interface when used.
Use
a=uni10.UniTensor([ bdi, bdo])
instead.
We plan to phase out the Python wrapping interface and rewrite a Python version of uni10 using Cython.
bdo = uni10.Bond(uni10.BD_OUT, 2) bdi = uni10.Bond(uni10.BD_IN, 2)
a=uni10.UniTensor(uni10.RTYPE,[ bdi, bdo]) a.randomize(uni10.RTYPE)
it should be real, but it's not? ComRel.py.zip
output:
COMPLEX
================BONDS=============== IN : (U1 = 0, P = 0, 0)|2, Dim = 2 OUT: (U1 = 0, P = 0, 0)|2, Dim = 2
===============BLOCKS=============== --- (U1 = 0, P = 0, 0): 2 x 2 = 4, COMPLEX