source:
python/lib/aubio/__init__.py
@
a41b1ef
Last change on this file since a41b1ef was 8bffcff, checked in by , 9 years ago | |
---|---|
|
|
File size: 450 bytes |
Rev | Line | |
---|---|---|
[229d050] | 1 | #! /usr/bin/env python |
2 | ||
[ccca7cb] | 3 | import numpy |
[4de5f35] | 4 | from ._aubio import * |
5 | from .midiconv import * | |
6 | from .slicing import * | |
[ccca7cb] | 7 | |
8 | class 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.