From: Paul Brossier Date: Sun, 24 Apr 2016 23:04:47 +0000 (+0200) Subject: python/lib/aubio__init__.py: use aubio.float_type X-Git-Tag: 0.4.4~300^2~217 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=8bffcff3eaa566300b61e6e03138645b68cb8b2a;p=aubio.git python/lib/aubio__init__.py: use aubio.float_type --- 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)