ref: 8bffcff3eaa566300b61e6e03138645b68cb8b2a
parent: c4b2183510f37285509236ed14bdff7f4e3c6957
author: Paul Brossier <piem@piem.org>
date: Sun Apr 24 21:04:47 EDT 2016
python/lib/aubio__init__.py: use aubio.float_type
--- a/python/lib/aubio/__init__.py
+++ b/python/lib/aubio/__init__.py
@@ -6,9 +6,10 @@
from .slicing import *
class fvec(numpy.ndarray):
- " a simple numpy array holding a vector of float32 "
+ """a simple numpy array holding a vector of %s""" % float_type
+
def __new__(self, length = 1024, **kwargs):
self.length = length
if type(length) == type([]):
- return numpy.array(length, dtype='float32', **kwargs)
- return numpy.zeros(length, dtype='float32', **kwargs)
+ return numpy.array(length, dtype = float_type, **kwargs)
+ return numpy.zeros(length, dtype = float_type, **kwargs)