shithub: aubio

Download patch

ref: df66c37332ff738b6430a543f9bffb818ffe9d1d
parent: 754a987c084743a71214f5381673ef56168f9376
author: Paul Brossier <piem@piem.org>
date: Wed Dec 19 12:14:31 EST 2018

[py] alpha_norm and zero_crossing_rate use PyFloat_FromDouble

--- a/python/ext/aubiomodule.c
+++ b/python/ext/aubiomodule.c
@@ -223,7 +223,7 @@
   }
 
   // compute the function
-  result = Py_BuildValue (AUBIO_NPY_SMPL_CHR, fvec_alpha_norm (&vec, alpha));
+  result = PyFloat_FromDouble(fvec_alpha_norm (&vec, alpha));
   if (result == NULL) {
     return NULL;
   }
@@ -319,7 +319,7 @@
   }
 
   // compute the function
-  result = Py_BuildValue (AUBIO_NPY_SMPL_CHR, aubio_zero_crossing_rate (&vec));
+  result = PyFloat_FromDouble(aubio_zero_crossing_rate (&vec));
   if (result == NULL) {
     return NULL;
   }