From: Paul Brossier Date: Wed, 19 Dec 2018 16:14:31 +0000 (+0100) Subject: [py] alpha_norm and zero_crossing_rate use PyFloat_FromDouble X-Git-Tag: 0.4.9~73 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=df66c37332ff738b6430a543f9bffb818ffe9d1d;p=aubio.git [py] alpha_norm and zero_crossing_rate use PyFloat_FromDouble --- diff --git a/python/ext/aubiomodule.c b/python/ext/aubiomodule.c index 03450647..d4ed0336 100644 --- a/python/ext/aubiomodule.c +++ b/python/ext/aubiomodule.c @@ -223,7 +223,7 @@ Py_alpha_norm (PyObject * self, PyObject * args) } // 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 @@ Py_zero_crossing_rate (PyObject * self, PyObject * args) } // 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; }