431f7196da509d473a025fc5532861aac8ac3b6c
[aubio.git] / python / lib / aubio / __init__.py
1 #! /usr/bin/env python
2
3 import numpy
4 from ._aubio import *
5 from .midiconv import *
6 from .slicing import *
7
8 class fvec(numpy.ndarray):
9     """a simple numpy array holding a vector of %s""" % float_type
10
11     def __new__(self, length = 1024, **kwargs):
12         self.length = length
13         if type(length) == type([]):
14             return numpy.array(length, dtype = float_type, **kwargs)
15         return numpy.zeros(length, dtype = float_type, **kwargs)