diff --git a/pytriqs/gf/local/imtime.pxd b/pytriqs/gf/local/imtime.pxd index c8490ca0..0074eccc 100644 --- a/pytriqs/gf/local/imtime.pxd +++ b/pytriqs/gf/local/imtime.pxd @@ -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" : diff --git a/pytriqs/gf/local/imtime.pyx b/pytriqs/gf/local/imtime.pyx index ff20fa29..2ae772a3 100644 --- a/pytriqs/gf/local/imtime.pyx +++ b/pytriqs/gf/local/imtime.pyx @@ -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): diff --git a/pytriqs/pxd/arrays.pxd b/pytriqs/pxd/arrays.pxd index 847ac306..182c3a25 100644 --- a/pytriqs/pxd/arrays.pxd +++ b/pytriqs/pxd/arrays.pxd @@ -41,6 +41,7 @@ cdef extern from "" 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 "" 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 +