source: python/lib/aubio/__init__.py @ a41b1ef

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since a41b1ef was 8bffcff, checked in by Paul Brossier <piem@piem.org>, 9 years ago

python/lib/aubioinit.py: use aubio.float_type

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