3
0
mirror of https://github.com/triqs/dft_tools synced 2025-01-12 05:58:18 +01:00

gf. add __call__(double) to gf_imtime, wrapped from C++ evaluator

This commit is contained in:
Olivier Parcollet 2014-04-02 11:13:37 +02:00
parent ecbcc60930
commit 22ef7ac015
3 changed files with 6 additions and 1 deletions

View File

@ -25,6 +25,7 @@ cdef extern from "triqs/gfs/imtime.hpp" namespace "triqs::gfs" :
void operator << (gf_imtime &)
mesh_imtime mesh()
array_view[double, THREE] data()
matrix_view[double] operator()(double)
tail singularity()
cdef extern from "triqs/gfs/imtime.hpp" :

View File

@ -21,6 +21,9 @@ cdef class GfImTime_cython:
def __dealloc__ (self):
pass
def __call__ (self, float tau) :
return matrix[double](self._c (tau)).to_python()
#---------------- Reading from h5 ---------------------------------------
def h5_read_GfImTime(gr, key):

View File

@ -41,6 +41,7 @@ cdef extern from "<triqs/python_tools/array_interface.hpp>" namespace "triqs::ar
cdef cppclass matrix "triqs::arrays::matrix" [T] :
matrix()
matrix(object) except +
matrix(matrix_view) except +
matrix operator +( matrix_view &)
matrix operator -( matrix_view &)
matrix operator /( matrix_view &)
@ -50,7 +51,7 @@ cdef extern from "<triqs/python_tools/array_interface.hpp>" namespace "triqs::ar
cdef matrix_view operator -( matrix_view & , matrix_view &)
cdef matrix_view operator *( matrix_view & , matrix_view &)
cdef matrix_view operator /( matrix_view & , matrix_view &)
cdef cppclass tqa_vector "triqs::arrays::vector" [T] :
tqa_vector()
tqa_vector(object) except +