Cython, confusion regarding the vector (size) constructor
<p>EDIT: FYI for anyone coming across this now just use pybind11 and don't waste your time on this (cython stuff)</p>

<p>It seems like the only way to do define a <code>vector</code> variable is </p>

<p><code>cdef std::vector[int]* vec=new vector[int](&lt;size&gt;)</code></p>

<p>Am I correct in thinking this? Here's sample code, if I compile and run this Python crashes at the end (VS2015, Python 3.5).</p>

<pre><code>from libcpp.vector cimport vector
def test():
    cdef vector[int]* vec = new vector[int](5)
    cdef int i
    for i in range(5):
        print(vec[i])

    del vec
</code></pre>

<p>I want to have a 2 dimensional vector, with a certain size. How would I do this? Would it be:</p>

<p><code>cdef std::vector[std::vector[int]]* vec=new vector[vector[int](&lt;size1&gt;)](&lt;size2&gt;)</code></p>