[Cython] Buffer syntax/array primitive type
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Sun Mar 8 11:43:17 CET 2009
Dag Sverre Seljebotn wrote:
> Adding a type templating mechanism to Cython is not out of the question I
> think, there was some talk 3/4 year ago. But now I myself believe the most
> promising option is to wrap C++ in a very good way, so that one can do
> something along the lines of
>
> cdef cpp.vector[int] arr = cpp.vector[int]()
> cdef cpp.map[str, cpp.vector[int]] map = cpp.map[str, cpp.vector[int]]()
> arr.push_back(3)
> map[40] = arr
Sorry, that should have been map["mystring"] = arr.
Dag Sverre
More information about the Cython-dev
mailing list