Index: python/ext/aubio-types.h
===================================================================
--- python/ext/aubio-types.h	(revision 1f4d932e233b44476f39d699a19e6c023e058626)
+++ python/ext/aubio-types.h	(revision 92a880038648589865c7bd3fac15647a7b792788)
@@ -51,11 +51,4 @@
 #endif
 
-// special python type for cvec
-typedef struct
-{
-  PyObject_HEAD
-  cvec_t * o;
-  uint_t length;
-} Py_cvec;
 extern PyTypeObject Py_cvecType;
 
@@ -64,6 +57,6 @@
 extern int PyAubio_ArrayToCFvec (PyObject * self, fvec_t *out);
 
-extern PyObject * PyAubio_CCvecToPyCvec (cvec_t * self, Py_cvec *out);
-extern int PyAubio_ArrayToCCvec (PyObject *input, cvec_t *i);
+extern PyObject * PyAubio_CCvecToPyCvec (cvec_t * self);
+extern int PyAubio_PyCvecToCCvec (PyObject *input, cvec_t *i);
 
 extern PyObject *PyAubio_CFmatToArray (fmat_t * self);
Index: python/ext/aubioproxy.c
===================================================================
--- python/ext/aubioproxy.c	(revision 1f4d932e233b44476f39d699a19e6c023e058626)
+++ python/ext/aubioproxy.c	(revision 92a880038648589865c7bd3fac15647a7b792788)
@@ -54,27 +54,4 @@
   out->data = (smpl_t *) PyArray_GETPTR1 ((PyArrayObject *)input, 0);
   return 1;
-}
-
-PyObject *
-PyAubio_CCvecToPyCvec (cvec_t * input, Py_cvec *vec) {
-  vec->length = input->length;
-  vec->o = input;
-  // keep a reference to re-use after returning it
-  Py_INCREF(vec);
-  return (PyObject *)vec;
-}
-
-int
-PyAubio_ArrayToCCvec (PyObject *input, cvec_t *i) {
-  if (PyObject_TypeCheck (input, &Py_cvecType)) {
-      //*i = *(((Py_cvec*)input)->o);
-      i->norm = ((Py_cvec*)input)->o->norm;
-      i->phas = ((Py_cvec*)input)->o->phas;
-      i->length = ((Py_cvec*)input)->o->length;
-      return 1;
-  } else {
-      PyErr_SetString (PyExc_ValueError, "input array should be aubio.cvec");
-      return 0;
-  }
 }
 
Index: python/ext/py-cvec.c
===================================================================
--- python/ext/py-cvec.c	(revision 1f4d932e233b44476f39d699a19e6c023e058626)
+++ python/ext/py-cvec.c	(revision 92a880038648589865c7bd3fac15647a7b792788)
@@ -1,15 +1,60 @@
 #include "aubio-types.h"
 
-/* cvec type definition 
+/* cvec type definition
 
 class cvec():
-    def __init__(self, length = 1024):
-        self.length = length 
-        self.norm = array(length)
-        self.phas = array(length)
+    def __new__(self, length = 1024):
+        self.length = length / 2 + 1
+        self.norm = np.zeros(length / 2 + 1)
+        self.phas = np.zeros(length / 2 + 1)
 
 */
 
+// special python type for cvec
+typedef struct
+{
+  PyObject_HEAD
+  PyObject *norm;
+  PyObject *phas;
+  uint_t length;
+} Py_cvec;
+
 static char Py_cvec_doc[] = "cvec object";
+
+PyObject *
+PyAubio_CCvecToPyCvec (cvec_t * input) {
+  if (input == NULL) {
+      PyErr_SetString (PyExc_ValueError, "PyAubio_CCvecToPyCvec got a null cvec!");
+      return NULL;
+  }
+  Py_cvec* vec = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType);
+  npy_intp dims[] = { input->length, 1 };
+  vec->norm = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, input->norm);
+  vec->phas = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, input->phas);
+  vec->length = input->length;
+  return (PyObject *)vec;
+}
+
+int
+PyAubio_PyCvecToCCvec (PyObject *input, cvec_t *i) {
+  if (PyObject_TypeCheck (input, &Py_cvecType)) {
+      Py_cvec * in = (Py_cvec *)input;
+      if (in->norm == NULL) {
+        npy_intp dims[] = { in->length, 1 };
+        in->norm = PyArray_ZEROS(1, dims, AUBIO_NPY_SMPL, 0);
+      }
+      if (in->phas == NULL) {
+        npy_intp dims[] = { in->length, 1 };
+        in->phas = PyArray_ZEROS(1, dims, AUBIO_NPY_SMPL, 0);
+      }
+      i->norm = (smpl_t *) PyArray_GETPTR1 ((PyArrayObject *)(in->norm), 0);
+      i->phas = (smpl_t *) PyArray_GETPTR1 ((PyArrayObject *)(in->phas), 0);
+      i->length = ((Py_cvec*)input)->length;
+      return 1;
+  } else {
+      PyErr_SetString (PyExc_ValueError, "input array should be aubio.cvec");
+      return 0;
+  }
+}
 
 static PyObject *
@@ -24,5 +69,4 @@
     return NULL;
   }
-
 
   self = (Py_cvec *) type->tp_alloc (type, 0);
@@ -48,9 +92,6 @@
 Py_cvec_init (Py_cvec * self, PyObject * args, PyObject * kwds)
 {
-  self->o = new_cvec ((self->length - 1) * 2);
-  if (self->o == NULL) {
-    return -1;
-  }
-
+  self->norm = NULL;
+  self->phas = NULL;
   return 0;
 }
@@ -59,5 +100,6 @@
 Py_cvec_del (Py_cvec * self)
 {
-  del_cvec (self->o);
+  Py_XDECREF(self->norm);
+  Py_XDECREF(self->phas);
   Py_TYPE(self)->tp_free ((PyObject *) self);
 }
@@ -79,5 +121,5 @@
     goto fail;
   }
-  cvec_print ( self->o );
+  // hide actual norm / phas content
 
   result = PyUnicode_Format (format, args);
@@ -91,28 +133,13 @@
 
 PyObject *
-PyAubio_CvecNormToArray (Py_cvec * self)
-{
-  npy_intp dims[] = { self->o->length, 1 };
-  return PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, self->o->norm);
-}
-
-
-PyObject *
-PyAubio_CvecPhasToArray (Py_cvec * self)
-{
-  npy_intp dims[] = { self->o->length, 1 };
-  return PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, self->o->phas);
-}
-
-PyObject *
-PyAubio_ArrayToCvecPhas (PyObject * self)
-{
-  return NULL;
-}
-
-PyObject *
 Py_cvec_get_norm (Py_cvec * self, void *closure)
 {
-  return PyAubio_CvecNormToArray(self);
+  // if it norm hasn't been created, create it now
+  if (self->norm == NULL) {
+    npy_intp dims[] = { self->length, 1 };
+    self->norm = PyArray_ZEROS(1, dims, AUBIO_NPY_SMPL, 0);
+  }
+  Py_INCREF(self->norm);
+  return (PyObject*)(self->norm);
 }
 
@@ -120,5 +147,11 @@
 Py_cvec_get_phas (Py_cvec * self, void *closure)
 {
-  return PyAubio_CvecPhasToArray(self);
+  // if it phas hasn't been created, create it now
+  if (self->phas == NULL) {
+    npy_intp dims[] = { self->length, 1 };
+    self->phas = PyArray_ZEROS(1, dims, AUBIO_NPY_SMPL, 0);
+  }
+  Py_INCREF(self->phas);
+  return (PyObject *)(self->phas);
 }
 
@@ -132,6 +165,5 @@
   }
   if (PyArray_Check(input)) {
-
-    // we got an array, convert it to a cvec.norm 
+    // we got an array, convert it to a cvec.norm
     if (PyArray_NDIM ((PyArrayObject *)input) == 0) {
       PyErr_SetString (PyExc_ValueError, "input array is a scalar");
@@ -159,13 +191,15 @@
       goto fail;
     } else {
-      if (vec->o->length != PyArray_SIZE (array)) {
+      if (vec->length != PyArray_SIZE (array)) {
           PyErr_Format (PyExc_ValueError,
                   "input array has length %d, but cvec has length %d",
-                  (int)PyArray_SIZE (array), vec->o->length);
+                  (int)PyArray_SIZE (array), vec->length);
           goto fail;
       }
     }
 
-    vec->o->norm = (smpl_t *) PyArray_GETPTR1 (array, 0);
+    Py_XDECREF(vec->norm);
+    vec->norm = input;
+    Py_INCREF(vec->norm);
 
   } else {
@@ -174,5 +208,4 @@
   }
 
-  Py_INCREF(array);
   return 0;
 
@@ -217,13 +250,15 @@
       goto fail;
     } else {
-      if (vec->o->length != PyArray_SIZE (array)) {
+      if (vec->length != PyArray_SIZE (array)) {
           PyErr_Format (PyExc_ValueError,
                   "input array has length %d, but cvec has length %d",
-                  (int)PyArray_SIZE (array), vec->o->length);
+                  (int)PyArray_SIZE (array), vec->length);
           goto fail;
       }
     }
 
-    vec->o->phas = (smpl_t *) PyArray_GETPTR1 (array, 0);
+    Py_XDECREF(vec->phas);
+    vec->phas = input;
+    Py_INCREF(vec->phas);
 
   } else {
@@ -232,5 +267,4 @@
   }
 
-  Py_INCREF(array);
   return 0;
 
Index: python/ext/py-fft.c
===================================================================
--- python/ext/py-fft.c	(revision 1f4d932e233b44476f39d699a19e6c023e058626)
+++ python/ext/py-fft.c	(revision 92a880038648589865c7bd3fac15647a7b792788)
@@ -14,6 +14,4 @@
   cvec_t *out;
   fvec_t *rout;
-  // bridge for cvec output
-  Py_cvec *py_out;
 } Py_fft;
 
@@ -61,6 +59,4 @@
 
   self->out = new_cvec(self->win_s);
-  self->py_out = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType);
-  Py_XINCREF(self->py_out);
   self->rout = new_fvec(self->win_s);
 
@@ -71,5 +67,4 @@
 Py_fft_del (Py_fft *self, PyObject *unused)
 {
-  Py_XDECREF((PyObject*)(self->py_out));
   del_aubio_fft(self->o);
   del_cvec(self->out);
@@ -93,12 +88,6 @@
   // compute the function
   aubio_fft_do (((Py_fft *)self)->o, &(self->vecin), self->out);
-#if 0
-  Py_cvec * py_out = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType);
-  PyObject* output = PyAubio_CCvecToPyCvec(self->out, py_out);
-  return output;
-#else
-  // convert cvec to py_cvec, incrementing refcount to keep a copy
-  return PyAubio_CCvecToPyCvec(self->out, self->py_out);
-#endif
+  // convert cvec to py_cvec
+  return PyAubio_CCvecToPyCvec(self->out);
 }
 
@@ -118,5 +107,5 @@
   }
 
-  if (!PyAubio_ArrayToCCvec (input, &(self->cvecin)) ) {
+  if (!PyAubio_PyCvecToCCvec (input, &(self->cvecin)) ) {
     return NULL;
   }
Index: python/ext/py-filterbank.c
===================================================================
--- python/ext/py-filterbank.c	(revision 1f4d932e233b44476f39d699a19e6c023e058626)
+++ python/ext/py-filterbank.c	(revision 92a880038648589865c7bd3fac15647a7b792788)
@@ -88,5 +88,5 @@
   }
 
-  if (!PyAubio_ArrayToCCvec(input, &(self->vec) )) {
+  if (!PyAubio_PyCvecToCCvec(input, &(self->vec) )) {
     return NULL;
   }
Index: python/ext/py-phasevoc.c
===================================================================
--- python/ext/py-phasevoc.c	(revision 1f4d932e233b44476f39d699a19e6c023e058626)
+++ python/ext/py-phasevoc.c	(revision 92a880038648589865c7bd3fac15647a7b792788)
@@ -11,5 +11,4 @@
   fvec_t vecin;
   cvec_t *output;
-  Py_cvec *py_out;
   cvec_t cvecin;
   fvec_t *routput;
@@ -73,5 +72,4 @@
 
   self->output = new_cvec(self->win_s);
-  self->py_out = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType);
   self->routput = new_fvec(self->hop_s);
 
@@ -105,12 +103,6 @@
   // compute the function
   aubio_pvoc_do (self->o, &(self->vecin), self->output);
-#if 0
-  Py_cvec * py_out = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType);
-  PyObject* output = PyAubio_CCvecToPyCvec(self->output, py_out);
-  return output;
-#else
-  // convert cvec to py_cvec, incrementing refcount to keep a copy
-  return PyAubio_CCvecToPyCvec(self->output, self->py_out);
-#endif
+  // convert cvec to py_cvec
+  return PyAubio_CCvecToPyCvec(self->output);
 }
 
@@ -131,5 +123,5 @@
   }
 
-  if (!PyAubio_ArrayToCCvec (input, &(self->cvecin) )) {
+  if (!PyAubio_PyCvecToCCvec (input, &(self->cvecin) )) {
     return NULL;
   }
Index: python/lib/gen_code.py
===================================================================
--- python/lib/gen_code.py	(revision 1f4d932e233b44476f39d699a19e6c023e058626)
+++ python/lib/gen_code.py	(revision 92a880038648589865c7bd3fac15647a7b792788)
@@ -38,5 +38,5 @@
 pytoaubio_fn = {
         'fvec_t*': 'PyAubio_ArrayToCFvec',
-        'cvec_t*': 'PyAubio_ArrayToCCvec',
+        'cvec_t*': 'PyAubio_PyCvecToCCvec',
         #'fmat_t*': 'PyAubio_ArrayToCFmat',
         }
