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

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change on this file since f5921b9 was 883b499, checked in by Paul Brossier <piem@piem.org>, 8 years ago

python/ext/aubiomodule.c: add aubio._aubio.version, import as aubio.version

  • Property mode set to 100644
File size: 600 bytes
Line 
1#! /usr/bin/env python
2
3import numpy
4from ._aubio import __version__ as version
5from ._aubio import float_type
6from ._aubio import *
7from .midiconv import *
8from .slicing import *
9
10class fvec(numpy.ndarray):
11    """a numpy vector holding audio samples"""
12
13    def __new__(cls, input_arg=1024, **kwargs):
14        if isinstance(input_arg, int):
15            if input_arg == 0:
16                raise ValueError("vector length of 1 or more expected")
17            return numpy.zeros(input_arg, dtype=float_type, **kwargs)
18        else:
19            return numpy.array(input_arg, dtype=float_type, **kwargs)
Note: See TracBrowser for help on using the repository browser.