From 8bffcff3eaa566300b61e6e03138645b68cb8b2a Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 25 Apr 2016 01:04:47 +0200 Subject: [PATCH] python/lib/aubio__init__.py: use aubio.float_type --- python/lib/aubio/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/lib/aubio/__init__.py b/python/lib/aubio/__init__.py index d15bbd50..431f7196 100644 --- a/python/lib/aubio/__init__.py +++ b/python/lib/aubio/__init__.py @@ -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) -- 2.11.0