ref: 074b41be3e6fa1a40ea2c5ea56a08b96bafa2435
dir: /python/lib/aubio/__init__.py/
#! /usr/bin/env python
import numpy
from _aubio import *
from midiconv import *
class fvec(numpy.ndarray):
" a simple numpy array holding a vector of float32 "
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)