projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
754a987
)
[py] alpha_norm and zero_crossing_rate use PyFloat_FromDouble
author
Paul Brossier
<piem@piem.org>
Wed, 19 Dec 2018 16:14:31 +0000
(17:14 +0100)
committer
Paul Brossier
<piem@piem.org>
Wed, 19 Dec 2018 16:14:31 +0000
(17:14 +0100)
python/ext/aubiomodule.c
patch
|
blob
|
history
diff --git
a/python/ext/aubiomodule.c
b/python/ext/aubiomodule.c
index
0345064
..
d4ed033
100644
(file)
--- a/
python/ext/aubiomodule.c
+++ b/
python/ext/aubiomodule.c
@@
-223,7
+223,7
@@
Py_alpha_norm (PyObject * self, PyObject * args)
}
// compute the function
}
// compute the function
- result = Py
_BuildValue (AUBIO_NPY_SMPL_CHR,
fvec_alpha_norm (&vec, alpha));
+ result = Py
Float_FromDouble(
fvec_alpha_norm (&vec, alpha));
if (result == NULL) {
return NULL;
}
if (result == NULL) {
return NULL;
}
@@
-319,7
+319,7
@@
Py_zero_crossing_rate (PyObject * self, PyObject * args)
}
// compute the function
}
// compute the function
- result = Py
_BuildValue (AUBIO_NPY_SMPL_CHR,
aubio_zero_crossing_rate (&vec));
+ result = Py
Float_FromDouble(
aubio_zero_crossing_rate (&vec));
if (result == NULL) {
return NULL;
}
if (result == NULL) {
return NULL;
}