python/lib/aubio__init__.py: use aubio.float_type
authorPaul Brossier <piem@piem.org>
Sun, 24 Apr 2016 23:04:47 +0000 (01:04 +0200)
committerPaul Brossier <piem@piem.org>
Sun, 24 Apr 2016 23:04:47 +0000 (01:04 +0200)
python/lib/aubio/__init__.py

index d15bbd5..431f719 100644 (file)
@@ -6,9 +6,10 @@ from .midiconv import *
 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)