source: python/lib/aubio/__init__.py @ 4de5f35

feature/autosinkfeature/constantqfeature/pitchshiftfeature/pydocstringsfeature/timestretchpitchshiftsamplertimestretchyinfft+
Last change on this file since 4de5f35 was 4de5f35, checked in by Paul Brossier <piem@piem.org>, 4 years ago

python/lib/aubio/init.py: use relative import (python3, see #33)

  • Property mode set to 100644
File size: 433 bytes
Line 
1#! /usr/bin/env python
2
3import numpy
4from ._aubio import *
5from .midiconv import *
6from .slicing import *
7
8class fvec(numpy.ndarray):
9    " a simple numpy array holding a vector of float32 "
10    def __new__(self, length = 1024, **kwargs):
11        self.length = length
12        if type(length) == type([]):
13            return numpy.array(length, dtype='float32', **kwargs)
14        return numpy.zeros(length, dtype='float32', **kwargs)
Note: See TracBrowser for help on using the repository browser.