From df66c37332ff738b6430a543f9bffb818ffe9d1d Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 19 Dec 2018 17:14:31 +0100 Subject: [PATCH] [py] alpha_norm and zero_crossing_rate use PyFloat_FromDouble --- python/ext/aubiomodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.11.0